1
General Discussion / Run two public servers on one IP with OPNSense
« on: April 24, 2024, 09:17:19 am »
Please help me out, I spent the last two days swearing at my computer and following various HAProxy guides with no success. So I figured I'd ask for some help as I am making zero progress in achieving this goal.
Here's my struggle:
I have an XCP-NG box running OPNSense in a VM at 14.0.0.1:1776. I have been running a public facing Server1 for some years with great success, but now I need to run another server.
Server1 is located at 14.0.0.11 and server 2 is located at 14.0.0.22
I want server1.dogs.com to point to 14.0.0.11 and for server2.cats.net to point to 14.0.0.22. I want it to be accessible from WAN.
Both domains are on cloudflare.
So I figure I need some middle man server or plugin to point wan traffic to that will look at it and say: this visitor is going to server1.dogs.com so they are routed to 14.0.0.11 and this other visitor is going to server2.cats.net and he needs to go to 14.0.0.22.
I don't need this middle man to do anything with SSL or load balancing or . I don't care about having SSL on LAN. The servers I have running handle their own SSL. I just need it to see the URL that a visitor is going to and route them to the proper internal IP.
Please advise, what's the easiest way to do this?
I'm open to running a plugin or another VM or really anything.
Here's my struggle:
I have an XCP-NG box running OPNSense in a VM at 14.0.0.1:1776. I have been running a public facing Server1 for some years with great success, but now I need to run another server.
Server1 is located at 14.0.0.11 and server 2 is located at 14.0.0.22
I want server1.dogs.com to point to 14.0.0.11 and for server2.cats.net to point to 14.0.0.22. I want it to be accessible from WAN.
Both domains are on cloudflare.
So I figure I need some middle man server or plugin to point wan traffic to that will look at it and say: this visitor is going to server1.dogs.com so they are routed to 14.0.0.11 and this other visitor is going to server2.cats.net and he needs to go to 14.0.0.22.
I don't need this middle man to do anything with SSL or load balancing or . I don't care about having SSL on LAN. The servers I have running handle their own SSL. I just need it to see the URL that a visitor is going to and route them to the proper internal IP.
Please advise, what's the easiest way to do this?
I'm open to running a plugin or another VM or really anything.