Results 1 to 2 of 2
I'm running White Box Linux and I want to use it as a file server for some Windows boxes. I've got samba up and running, as long as I disable ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-01-2004 #1Just Joined!
- Join Date
- Apr 2003
- Location
- Bucks, UK
- Posts
- 40
Can't open ports to a server using iptables, help please
I'm running White Box Linux and I want to use it as a file server for some Windows boxes. I've got samba up and running, as long as I disable the firewall. From what I've read, I just need to open ports 137 to 139 (assume TCP), which I've tried to do with
The problem is that it doesn't seem to make any differenceCode:iptables -A INPUT -p tcp --dport 137:139 -j ACCEPT
My iptables doesn't look like the examples, so I'm struggling to read it.- # Firewall configuration written by redhat-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
Am I putting the new rule in the wrong place?
Do I have to add an OUTPUT rule?
- 09-06-2004 #2Just Joined!
- Join Date
- Apr 2003
- Location
- Bucks, UK
- Posts
- 40
It does work after all, I think I was just getting confused by the network master browser not finding the machine.


Reply With Quote
