bind interface to private IP

daveo daveo at
Fri Nov 10 05:29:43 GMT 2000

On Thu, 9 Nov 2000, wrote:

> I want samba to bind nmbd and smbd daemons to not my public ip, for
> security....basically I want to run samba on my lan,..but not have the samba
> daemons bind to my public when u run nmap on my public ip, u don't
> see ports 139 and 138 open.

A quick and simple way is to block all traffic going to ports 139 and 138
on eth0 using ipchains:

/sbin/ipchains -A input -p tcp -i eth0 -s -d <your public ip> \
137:139 -j REJECT
/sbin/ipchains -A input -p udp -i eth0 -s -d <your public ip> \
137:139 -j REJECT

Hope that helps,


More information about the samba mailing list