Knowing your server’s IP address(s) can be a useful bit of information to have for various reasons. After all, other than your domain, the server’s IP is the main address used to reach the server. Knowing a server’s IPs may be necessary when making changes to: DNS, networking, and security. A server may have a single IP, or multiple IPs, sometimes you need a quick way double check since it’s easy to forget.
This tutorial will teach you how to check the IPs of any modern Linux server. To follow along will simply need access to the server via SSH or TTY.
- This tutorial requires basic knowledge of SSH and command line.
See our KB article on command line access via SSH.
- You must have SSH access to the server.
Check IPs with Command Line
- Begin the process by logging into your server via SSH:
- Now logged in via SSH, run the following command to check the servers IP:
This command is using the `ip` tool and is calling the `route` object, this command prints the current routing table.
Reading the Results
Once you execute that command you’ll see output similar to the following text. This is showing the servers IP routing table, essentially this is a set of rules used to determine where data will be directed.
When using this technique to find a server’s IPs you’ll keep an eye out for lines containing `src` followed by an IP. On these lines, the IP address following `src` are an IP configured on the server.
default via 203.0.113.1 dev eth0
203.0.113.0/24 dev eth0 proto kernel scope link src 203.0.113.86
188.8.131.52/16 dev eth0 scope link metric 1002
Any device using IP addresses will have a routing table used to determine the devices networking behavior.
In the example results, shown above, you see a severs routing table showing that the server has an IP address of: `203.0.113.86`.
While it may not look like much to new users these lines are dense with information. Each line of the routing table is there to describe a different behavior or condition. More information on these can be found in the ip commands manual pages, these can be found in the command line using `man ip route`. You can also read the man page online here.
Liquid Web allows additional IP addresses to be added to your server for a minimal fee. Having multiple IP addresses on your server can be useful when needing to differentiate domains hosted on your server. With multiple IPs you can setup advanced firewall configurations, use different hostnames with reverse DNS and more.
In any case, if you need to add more IPs to your server LiquidWeb provides a simple process through our Manage interface.
Add a New IP to Your Server
To add a new IP to your server you will first need to login to your Liquid Web account. Once logged in to the Manage interface you will see your servers and services listed on the page.
- To being, open the server you wish to add IP addresses to using the [+] next to the server name. Once the server is open, click on the Network button at the top of the server section.
- This will take you to the Network tab of the Server Details page. From here, you can control your firewall, public and private network.
- Select the Public Network tab to add IP addresses. Enter the number of new IPs you’d like to add in the box labeled “New IPs to Add”. Once filled out you can click the Add New IP(s) button to begin the process.
When adding an IP address, it will require that your server restart. A warning box will appear to confirm that you are aware. Click Add IP(s) in this pop-up to confirm and begin the process.
- After clicking the Add IP(s) button, you can track the progress in the Notifications section in your Liquid Web account. After the process completes, the new IP addresses will show on the page. You can make note of them if you want and assign them to your domains.
While you have the ability to add some IPs on your own, there is a limit to IPs that can be automatically assigned through Manage. If you find that you need more, please create a Support Ticket and we will be more than happy to assist you.
- These instructions are intended specifically for solving the error: /usr/sbin/ifconfig: No such file or directory
- I’ll be working from a Liquid Web Self Managed CentOS 7 server, and I’ll be logged in as root.
Continue reading “Error: /usr/sbin/ifconfig: No such file or directory [SOLVED]”