bind interface to private IP

daveo daveo at sic.nsw.edu.au
Fri Nov 10 05:29:43 GMT 2000


On Thu, 9 Nov 2000, digitalconscious.com wrote:

> I want samba to bind nmbd and smbd daemons to 10.0.0.1 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 ip....so 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 0.0.0.0/0 -d <your public ip> \
137:139 -j REJECT
/sbin/ipchains -A input -p udp -i eth0 -s 0.0.0.0/0 -d <your public ip> \
137:139 -j REJECT

Hope that helps,

dave





More information about the samba mailing list