OpenWrt Forum Archive

Topic: Multi Servers behind router

The content of this topic has been archived on 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Good day,

I use a linksys router that is capable of running OpenWRT.

Someone told me that OpenWRT would be my solution to a problem.

I have a couple of servers behind my router, that all want to listen on port 80.

I currently use Port redirect to solve the issue, but have problems with people remembering all the different port numbers for the correct item they want.

I have been advised that OpenWRT can actually handle the direction of multi servers on the same port. 
Is this actually something it can do? if so, what mod or package do I need to work with to get it going.

Any info on the subject would be greatly appreciated.

Thanks
Tom

In general, neither OpenWrt or any other software can do that: there is no way a router can guess which service is the client trying to reach, if all services are in the same port 80; there is provision at the TCP/IP level to do that.

However, version 1.1 of the HTTP protocol introduced the capability of hosting several "virtual hosts" in the same "physical server". So, you could host a web server in the OpenWrt, and service several domains from that web server, be it directly or forwarding / redirecting to an internal host.

Have a look at the Web Server Overview, and see which of them meets your needs. Or you could also try using a proxy server instead (see Proxy Server Overview), if properly configured.

What eduperez says is true. In addition, if you have IPv6 running, each of the hosts behind your firewall can respond to port 80 (assuming you put entries in the firewall to allow this). Of course, this would require each server to have a unique DNS name (with AAAA records).

The discussion might have continued from here.