After an additional purchased IP address is mapped to a secondary network interface, you must ensure that the interface is active and recognized by the server operating system. This article explains how to check and configure a Linux server, and how to troubleshoot connectivity issues.
Note: In standard mapping mode, the operating system normally sees only the private IP address of the secondary network interface, not the additional purchased IP address. This is expected. Do not add the additional purchased IP address directly to the network interface configuration.
Before you begin, confirm the following network and access settings:
The examples below use the following values. Replace them with the values from your environment:
| Configuration item | Example value |
|---|---|
| Primary interface | eth0 |
| Secondary interface | eth1 |
| Private IP address of the secondary interface | 192.168.10.20/24 |
| Subnet gateway | 192.168.10.253 |
Log in to the server and run:
ip addr
Find the secondary interface, for example eth1, and check the following:
state UP.Check the routing table:
ip route
route -n
Normally, a directly connected route for the subnet of the secondary interface should be present. Recent Linux distributions usually detect the interface and obtain its address automatically. If eth1 is UP and its address and routes are correct, continue to Configure the Application Service.
This method applies to recent Linux distributions that use NetworkManager.
List the connection names:
nmcli connection show
If a connection already exists for the secondary interface, enable automatic address configuration:
sudo nmcli connection modify "Secondary interface connection name" \
ipv4.method auto \
connection.autoconnect yes
sudo nmcli connection up "Secondary interface connection name"
If no connection exists, create one:
sudo nmcli connection add \
type ethernet \
ifname eth1 \
con-name secondary-eth1 \
ipv4.method auto \
connection.autoconnect yes
sudo nmcli connection up secondary-eth1
This method applies to systems that use /etc/sysconfig/network-scripts/. Create or edit /etc/sysconfig/network-scripts/ifcfg-eth1:
DEVICE=eth1
TYPE=Ethernet
BOOTPROTO=dhcp
ONBOOT=yes
DEFROUTE=no
DEFROUTE=no prevents the secondary interface from replacing the primary interface as the default outbound path. After saving the file, reload the connection using the method supported by your system:
sudo nmcli connection reload
sudo nmcli connection up eth1
Warning: Changing network settings may interrupt your remote session. Back up the original configuration first, and make sure that you can use a console terminal to restore network access.
The additional purchased IP address is mapped to the private IP address of the secondary interface outside the server. The application should listen on one of the following addresses:
0.0.0.0: listens on all IPv4 addresses on the server.192.168.10.20.Do not bind the service only to 127.0.0.1. In standard mapping mode, do not bind it directly to the additional purchased IP address.
Check listening ports:
sudo ss -lntup
For example, a web service should listen on 0.0.0.0:80, 0.0.0.0:443, or the corresponding port on the private IP address of the secondary interface.
Check both the access rules associated with the secondary interface and the server firewall. For firewalld, allow HTTP and HTTPS as follows:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
To allow a custom port, such as TCP 8080:
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
Allow only the ports required by your services, and restrict the permitted source addresses whenever possible.
For common web or SSH services that only receive connections from outside, no additional default-route changes are normally required when the interface and routes are already correct.
If the server has multiple interfaces and requests arrive but responses fail or leave through the wrong interface, configure policy-based routing using the private IP address of the secondary interface:
sudo ip -4 route add default via 192.168.10.253 dev eth1 table 1001
sudo ip -4 rule add from 192.168.10.20 lookup 1001
Check the configuration:
ip -4 route show table 1001
ip -4 rule show
This policy means that traffic with source address 192.168.10.20 leaves through eth1 and its gateway, keeping the request and response paths consistent.
Note: Routes added with the ip command are temporary and are lost after a reboot. After verification, save the rules as persistent configuration using the network management method supported by your Linux distribution.
ip addr show eth1
ip route
sudo ss -lntup
From another device that can access the Internet, run:
curl -I http://ADDITIONAL_PURCHASED_IP
curl -kI https://ADDITIONAL_PURCHASED_IP
To test SSH:
ssh username@ADDITIONAL_PURCHASED_IP
If policy-based routing is configured, specify the private IP address of the secondary interface when testing the outbound address:
curl --interface 192.168.10.20 https://ifconfig.me
The result should be the additional purchased IP address mapped to that private IP address.
ip link show eth1
ip addr show eth1
If the status is state DOWN, enable the interface and check the system network configuration.
sudo ss -lntup
Make sure the service is not listening only on 127.0.0.1 or the primary interface address.
ip route
ip rule
ip route show table 1001
sudo tcpdump -ni eth1
To capture a specific service port, for example:
sudo tcpdump -ni eth1 tcp port 80
Make sure the access rules for the secondary interface, network ACLs, the server firewall, and application-level restrictions all allow the required traffic.
ip addr?In standard mapping mode, the additional purchased IP address is not directly exposed to the operating system. The server only needs the private IP address of the secondary interface to be configured correctly.
In a multi-interface environment, the request and response may use different paths. Check the default route and, if necessary, configure policy-based routing based on the private IP address of the secondary interface.
Make sure the secondary interface is configured to start automatically, and save the verified route rules in the persistent network configuration supported by your operating system rather than using temporary commands only.
Current system time:2026-09-07 20:39:05(UTC+8) Privacy PolicyRegistrants' Benefits And Responsibilities SpecificationsRegistrant Educational Information
Copyright© 2026 GNAME.COM. All rights reserved. Non-Public Registrant Data (NPRD) Disclosure