Name-based to IP-based virtual host configuration?


I am very far from being a networking expert so please be patient with me if I've got any terminology wrong or if my ideas are misconstrued.

I have a fairly normal small business internet connection with a single static IP allocated and I have configured a server so that it runs MetalLB (in front of Traefik) on the ethernet adapter and gives seperate IP addresses for each virtual host that is running on the server. I can access my virtual servers from the LAN by using the virtual hostname eg accessing gets those web pages (via LAN IP and gets the web pages for that virtual server (via LAN IP The name resolution for LAN traffic is done by LUCI/Network/Hostnames mapping to and to Works fine.

What I need is a way to route internet host requests that come in on the broadband internet connection to the individual LAN IP addresses with similar effect but I am lost in a sea of jargon and don't really know what is the best way to approach this or what t try to set up.

Any ideas, comments or suggestions would be most welcome.


Can't you just redirect all the external traffic to MetalLB, and let it handle the issue? I was going to say you need a reverse proxy, but that is exactly what you already have on MetalLB.

1 Like

Unfortunately not, MLB/Traefik works by having the connections for each server to come in on a different IP (though all on the same MAC). If I direct internet traffic for to the IP for then the response is the html for h2.s2. That seems to be how the MetalLB / Traefik combo works.

Thanks for your reply,

1 Like

Sorry vgaeyera but you are going to have to be more explicit than that for me to understand. Do you mean that I need to install an Nginx onto my OpenWRT router ? I had hoped it would be possible to configure the firewall to achieve what I need ?

You need to parse the HTTP headers to redirect traffic to a specific IP.
Firewall does not provide this function, but you can use a reverse proxy.
Install the reverse proxy on either the router or some host behind it.

1 Like