Bind additional IPs to a Freebsd server?

To bind IPs to your FreeBSD server:

Open /etc/rc.conf with your editor:

# vi /etc/rc.conf

You should see a line which looks like this:

ifconfig_fxp0="inet 66.96.xx.10 netmask"

where 66.96.xx.10 is the main ip address of your server.

Directly under it add this
ifconfig_fxp0_alias0="inet 66.96.xx.11 netmask"

Change 66.96.xx.11 to whatever your additional IP is.

If you have more then one additional IPs increase the number after alias for each ip

ifconfig_fxp0_alias0="inet 66.96.xx.11 netmask"
ifconfig_fxp0_alias1="inet 66.96.xx.12 netmask"
ifconfig_fxp0_alias2="inet 66.96.xx.13 netmask"
ifconfig_fxp0_alias3="inet 66.96.xx.14 netmask"
ifconfig_fxp0_alias4="inet 66.96.xx.15 netmask"
ifconfig_fxp0_alias5="inet 66.96.xx.16 netmask"
ifconfig_fxp0_alias6="inet 66.96.xx.17 netmask"
ifconfig_fxp0_alias7="inet 66.96.xx.18 netmask"


Save the file and run /etc/netstart


Thats it!

Share on Twitter
Share on Facebook