Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

Your Answer


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.