Verified and Tested 08/12/2015
This guide will show you how to add an additional public and/or private IP on your Arch Linux server.
-An Arch Linux server and an additional public IP reserved and assigned to the server or a private IP chosen for your granted private IP range.
-Netctl installed on the server.
Adding an Additional IP on Arch Linux
The first thing we will need to do is create a netctl file for eth0 (or edit the current one if it exists.) In our case the file /etc/netctl/eth0 exists, so we’ll edit that and add our additional IP address, y.y.y.y/xy.
Connection is the connection type.
Description is a custom description for the connection. You can use what you’d like.
Interface is the interface we will be using for the connection.
IP is the type the IP will be. Usually this is static or DHCP if you have IP allocation by DHCP available.
Address is the list of IP addresses and their associated subnets. Each IP address needs to be contained inbetween a pair of ‘ ‘ and separated by a space. They need to contain their associated subnet in order to work. This is where you list your main IP and then any additional IP addresses.
Gateway is the default gateway for the server. This should be the main IP’s gateway and no others.
DNS would be the DNS servers. In this instance I used the Atlantic.Net DNS servers.
We then need to restart this by running:
netctl restart eth0
Once up, you should be good to go and the additional IP should now respond.
Adding an Private IP on Arch Linux
To do a private IP we would need to create a new netctl file that we’ll name eth1. It is essentially the same as adding a public IP only this uses the private interface.
Description='Private ethernet connection'
You can add as many private IPs as you’d like following the IP addition example in the Public IP section. Simply add more IPs between a pair of ‘ ‘ and separated by a space. Once saved, just bring it up with:
netctl start eth1
Once this is up, your private IP will start working.
That’s all there is to adding a new IP address on an Arch Linux system.