We have two public IPs:
| Purpose | IP | Port |
|---|---|---|
| Websites (Apache/Nginx) | 51.210.247.102 | 80 (HTTP), optionally 443 if you want) |
| ISPConfig admin panel | 51.210.247.102 | 443 (HTTPS) |
| stunnel (OpenVPN / other TCP) | 5.135.106.93 | 443 |
1️⃣ Traffic separation
Main IP (51.210.247.102): receives HTTPS requests for ISPConfig and normal HTTP/HTTPS for websites
Additional IP (5.135.106.93): only receives stunnel traffic (OpenVPN wrapped in TLS)
This works because:
Linux binds sockets to specific IPs.
No port conflict occurs because 443 on each IP is independent.
2️⃣ Practical layout
Notes:
Nginx / Apache on the main IP decides whether a connection is for ISPConfig or website.
stunnel only listens on the secondary IP — traffic is separate.
Both services can use port 443 because they bind to different IPs.
3️⃣ Example nginx setup (Main IP)
a) Websites
b) ISPConfig admin panel (HTTPS)
4️⃣ stunnel setup (Secondary IP)
/etc/stunnel/stunnel.conf:
Listens only on secondary IP
Forwards to local OpenVPN on 1195
5️⃣ Firewall
Only those IPs respond on respective ports
No collisions
6️⃣ Advantages of this setup
Clear separation of web, panel, VPN
ISPConfig admin can safely run on 443 of main IP
stunnel doesn’t interfere with web traffic
Easy to scale if you later add more IPs / VPNs