How to Configure Multiple IP Addresses on One VPS

Running multiple IP addresses on a single VPS is useful for hosting multiple SSL certificates on legacy systems, separating email sending reputation per domain, or running isolated services. This guide covers configuring additional IPs.

Common Reasons for Multiple IPs

  • Separate dedicated IPs for different email-sending domains, isolating sender reputation
  • Hosting multiple SSL certificates on systems/clients that don't support SNI (increasingly rare, but still relevant for some legacy integrations)
  • Running isolated services that need distinct public-facing addresses

Step 1 — Order Additional IP Addresses

Request additional IPv4 addresses through your VPS provider's control panel or support — this is typically an add-on to your existing plan, and the provider will assign the specific IP address(es) and confirm the netmask/gateway to use.

Step 2 — Add the Additional IP to Your Network Configuration

Using netplan on Ubuntu/Debian:

sudo nano /etc/netplan/50-cloud-init.yaml
network:
  ethernets:
    eth0:
      addresses:
        - 203.0.113.10/24
        - 203.0.113.11/24
      gateway4: 203.0.113.1

Step 3 — Test Before Applying Permanently

sudo netplan try

Step 4 — Apply the Configuration

sudo netplan apply

Step 5 — Verify Both IPs Are Active

ip addr show

Binding a Service to a Specific IP

For Nginx, specify the exact IP in the listen directive:

server {
    listen 203.0.113.11:443 ssl;
    server_name seconddomain.com;
    ...
}

Using Multiple IPs for Email (Reputation Isolation)

Configure Postfix to send from a specific source IP per domain using sender_dependent_default_transport_maps or a similar transport map — consult Postfix's documentation for the exact configuration matching your version, since this setup varies based on your specific mail routing needs.

Verifying Outbound Traffic Uses the Correct IP

curl --interface 203.0.113.11 ifconfig.me

Common Errors

Second IP configured but not reachable externally — confirm your provider has actually routed that IP to your VPS at the network level; contact support to verify the assignment is active on their end.

Service still using the wrong IP for outbound connections — explicitly bind the service to the desired source IP rather than relying on default routing behavior.

Best Practices

  • Document which service uses which IP to avoid confusion during troubleshooting
  • Configure PTR records individually for each IP if used for email — see How to Set Up Reverse DNS (PTR/rDNS) for Email Deliverability
  • Test connectivity to each IP independently after configuration

Related Articles

  • How to Configure a Static IP on a Linux VPS
  • How to Set Up Reverse DNS (PTR/rDNS) for Email Deliverability
  • How to Set Up a VPS for Email Marketing (Complete Guide)
  • multiple ip addresses, secondary ip, network configuration, dedicated ip
  • 0 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

DNS Fundamentals: A, AAAA, CNAME, MX, TXT & NS Records Explained

DNS translates human-readable domain names into the information servers actually need — IP...

How to Point a Domain to Your VPS (A/AAAA Records)

Before your website is reachable at yourdomain.com instead of a raw IP address, you need to...

How to Configure MX Records for Email Delivery

MX (Mail Exchange) records tell the internet which servers handle incoming email for your domain....

How to Use CNAME Records Correctly

CNAME records let you alias one domain name to another, but they come with important restrictions...

How to Enable and Configure IPv6 on Your VPS

IPv6 adoption continues to grow, and many VPS plans include a free IPv6 address alongside IPv4....