LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Help with RedHat firewall open ports (https://www.linuxquestions.org/questions/red-hat-31/help-with-redhat-firewall-open-ports-171782/)

Linux6574 04-18-2004 05:05 PM

Help with RedHat firewall open ports
 
Hello,

Can someone tell me how to open port 139 from the redhat 9 firewall?
What command should i write so that i can open this port? I need to access some samba shares, but i cannot open port 139 for access. When i do a scan it says that port 139 is closed.

thanks.

Capt_Caveman 04-18-2004 09:28 PM

As root:

iptables -I INPUT -p tcp --dport 139 -j ACCEPT

If this system is accessible to the internet, you should only allow ip address(es) that need access (allowing public access to Samba shares is a really bad idea). So can use this as a template, just subsitute in the appropriate IP address or network subnets:

iptables -I INPUT -s XXX.XXX.XXX.XXX -p tcp --dport 139 -j ACCEPT


--EDIT--

Once you get it working, save your ruleset so that it will remain after a reboot:

service iptables save

Linux6574 04-24-2004 08:20 AM

Thanks for the reply
 
Thanks,

I know that it's a bad idea to shere samba over internet. Right now i dropped the samba thing. I'm going with vsftp it's much more reliable.

Again thanks.

Linux6574.


All times are GMT -5. The time now is 05:32 PM.