Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ipchain to open ports 137 through139 2

Status
Not open for further replies.

pavNell

Technical User
Joined
Sep 27, 2002
Messages
178
Location
US
Using Suse 9.1 pro, I normally boot to runlevel 3 and I have my Samba server running. My firewall is blocking ports 137 through 139 which samba needs. I'm a complete ipchains idiot (too many moving parts I guess) and the only way that I know how to open those ports up is to startx and use the yast gui firewall configuration utility to disable the firewall. Not very desireable. But now my samba server can get through. I can even exit runlevel 5 back to 3 and my ports are still open. TOO OPEN.

My question is, using ipchains and a startup script, how can I...

at boot time,
upon entering runlevel 3, open ports 137 and 139 to only host 192.168.1.101

thanks for any help.
 
[tt]/sbin/ipchains -I INPUT 1 -s 192.168.1.101 --destination-port 137:139 -j ACCEPT[/tt]

Been a while, but that should work.

----
JBR
 
That looks like what I was looking for flugh, i'll give it a try later at home. Thanks a lot.
 
sleipnir214...
Absolutley iptables. Thanks. Suse 9.1 default path to iptables is /usr/sbin/iptables

flugh...
You were very close! Along with sleipner214s' input, yours and man page, I came up with this that worked:
/usr/sbin/iptables -I INPUT 1 -s 192.168.1.101 -m multiport \
-p udp --dports 137,138,139 -j ACCEPT

I thank you both with a star.

mdg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top