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)
