Adding New IP to DirectAdmin From Different Subnet and Gateway

Earlier I’ve posted an article describing how to add multiple ip addresses on a single network device.

Even though you can add IP addresses on Direct Admin using it’s GUI, unfortunately the GUI fails if the netmask or the gateway is different. So if you have a server running Direct Admin with the IP address 10.10.10.5 and you want to add a new IP address like 192.168.16.7 then you’ll run into some problems.

To deal with it, we can add the IP’s manually. You can either add the IP’s to a new device, or an alias to a present device.

Let’s first learn what device we’re using.
ifconfig
This will probably return something like “eth0″ which is he device. If you’d like to add your new IP as an alias to this one, simple create the file below:
vi /etc/sysconfig/network-scripts/ifcfg-eth0:1
DEVICE=eth0:1
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.10.7
NETMASK=255.255.255.248
Note that there’s no Gateway specified here, so if you’d like to add an IP address with a different gateway, create the file below (with your own settings ofcouse)
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
HWADDR=AA:BB:CC:DD:EE:FF
IPADDR=192.168.10.7
NETMASK=255.255.255.248
GATEWAY=192.168.10.1
After this, just restart your network service. (Don’t forget that if you do anything wrong, you probably won’t be able to reach your server over network)
service network restart
  • 89 Users Found This Useful
Was this answer helpful?

Related Articles

PHP-SOAP Installation on DirectAdmin

People using Direct Admin usually do the mistake to install anything new by using the yum...

Directadmin : Problem Receiving Emails – The “Unknown User” Issue

If you get a 550 error as a reply when you email a user with directadmin, saying Remote host...

How to Reset DirectAdmin “admin” Password

DirectAdmin determines the admin password during installation and saves these passwords into the...

MySQL root password recovery in DirectAdmin

Before changing MySQL root password you may try to recover default installation password....

Step III: DirectAdmin post installation tasks

There are some important processes after successfully installation of DirectAdmin and if you miss...