Skip to main content.

2001-Sep-15

Question on netbsd-help about IP aliases only working from outside, but not locally. This is fixed by mapping the IPs to localhost: "route add $add 127.0.0.1". If you use the /etc/rc.d/network or /etc/netstart script to start up the aliases as defined by the ifaliases variable or /etc/ifaliases file, then this is done for you.

The /etc/rc.d/network script doesn't do this if you use the documented preferred way of using the /etc/ifconfig.xxN file.

Later, A. Brown noted that if the aliases are all on the same subnet, then the netmasks can be set to 255.255.255.255 (aka 0xffffffff) and adding the route to the loopback is not needed.