copiato pari pari da un risultato da ricerca google al secondo risultato
(
http://tinyurl.com/mn4ovvd):
Firewalling:
Le porte utilizzate dal server samba sono le stesse di un server SMB
Windows ovvero 137 UDP, 138 UDP, 139 TCP e 445 TCP. Una possibile
configurazione di iptables potrebbe essere la seguente:
root@server:~# iptables -P INPUT DROP
root@server:~# iptables -I INPUT -m state --state
ESTABLISHED,RELATED -j ACCEPT
root@server:~# iptables -A INPUT -p TCP --dport 139 -j ACCEPT
root@server:~# iptables -A INPUT -p TCP --dport 445 -j ACCEPT
root@server:~# iptables -A INPUT -p UDP --dport 137 -j ACCEPT
root@server:~# iptables -A INPUT -p UDP --dport 138 -j ACCEPT