Difference between revisions of "Add an IP address to a server"
(here's what I did) |
(Change source-code blocks to standard format) |
||
Line 6: | Line 6: | ||
Additional IP addresses may require a slightly different format for the ''/etc/network/interfaces'' file as in the following example from our server at [http://www.esecuredata.com eSecureData] server. Any changes to the networking environment require a restart with '''/etc/init.d/networking restart'''. | Additional IP addresses may require a slightly different format for the ''/etc/network/interfaces'' file as in the following example from our server at [http://www.esecuredata.com eSecureData] server. Any changes to the networking environment require a restart with '''/etc/init.d/networking restart'''. | ||
− | + | <source> | |
# This file describes the network interfaces available on your system | # This file describes the network interfaces available on your system | ||
# and how to activate them. For more information, see interfaces(5). | # and how to activate them. For more information, see interfaces(5). | ||
Line 39: | Line 39: | ||
dns-nameservers 209.139.209.33 | dns-nameservers 209.139.209.33 | ||
dns-search localdomain | dns-search localdomain | ||
− | </ | + | </source> |
Latest revision as of 18:11, 22 May 2015
Add an IP address to a server Organic Design procedure |
If you're running on a VPS then the network interfaces will be automatically generated, but when running a dedicated server you are responsible for all configuration. Ensure that your provider gives you an additional means of connecting to your server such as a virtual KVM solution because any mistakes in the network configuration can result in complete loss of access to the machine. If such access is not available, back up all data first so that an OS reinstall can be done as a last resort.
Additional IP addresses may require a slightly different format for the /etc/network/interfaces file as in the following example from our server at eSecureData server. Any changes to the networking environment require a restart with /etc/init.d/networking restart.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The primary network interface
auto eth0 lo
iface eth0 inet static
address 127.0.0.1
netmask 255.255.255.255
broadcast 0.0.0.0
iface lo inet loopback
# Primary IP address
auto eth0:0
iface eth0:0 inet static
address 209.17.190.248
netmask 255.255.254.0
network 209.17.190.0
broadcast 209.17.191.255
gateway 209.17.190.1
dns-nameservers 209.139.209.33
dns-search localdomain
# Second IP address
auto eth0:1
iface eth0:1 inet static
address 209.17.171.247
netmask 255.255.254.0
network 209.17.170.0
broadcast 209.17.171.255
gateway 209.17.170.1
dns-nameservers 209.139.209.33
dns-search localdomain