Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've recently installed Fedora 18 on one of the machines in my office, and I've installed Samba so I can browse the file system on my Windows machine.

However, I'm having some trouble opening port 137 for the NetBIOS naming system. I'm using the command below to open the port but when I use iptables -L or nmap -sT -O localhost in an attempt to list the open ports, it doesn't appear anywhere.

[root@localhost ~]# iptables -A INPUT -p tcp --dport 137 -j ACCEPT
[root@localhost ~]# service iptables save

Note: I've checked that both the smb and nmb daemons are up and running, they are (although log.smbd lists a warning about the standard input is not a socket and denied permissions for the /root/.pkcs11/pksc11.conf file).

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

Fedora 18 doesn't use iptables by default (you need to turn off firewalld if you haven't yet): http://www.chesterproductions.net.nz/blogs/it/sysadmin/changing-back-to-iptables-in-fedora-18/616/

I don't have a Fedora installation to try... but on CentOS, I have to add rules to a Chain called 'RH-Firewall-1-INPUT'. The regular INPUT chain references RH-Firewall-1-INPUT.

The last rule in your RH-Firewall-1-INPUT might be:

REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

The -A (append) in your command would put your SMB rule after the catchall REJECT... your SMB packets would be dropped before getting to your rule!

This might be what you need:

[root@localhost ~]# iptables -I RH-Firewall-1-INPUT -p tcp --dport 137 -j ACCEPT
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.