1

Is it possible to, for ex.:

  • point domain.com to 192.168.1.10
  • point domain2.com to 192.168.1.11

inside my LAN network?

Or even more with port forwarding:

  • point domain.com:80 to 192.168.1.10:5000
  • point domain2.com:80 to 192.168.1.10:5001

I have public IP and the domains point to my public IP now however all I can do on my router is to forward ports without "domain routing".

I have the Netgear R7800 with the possibility of running Entware (https://github.com/Entware/Entware).

Thanks for any advices

1 Answer 1

2

That's not possible, since from the outside world only your router exists, and it has only one unique IP address.

You may have multiple domains pointing to your router, but any software that finds out via DNS the meaning of domain.com and domain2.com will evaluate both domains to the same IP address, and then will work directly with that address. After DNS has done its part, the domain name does not matter any more, and connections are done using the IP address.

What you are asking is only possible with the HTTP and FTP protocols, since they also transmit domain names along with the request. This will require your setting up an internal HTTP server, such as Apache or IIS, which will forward the requests to other HTTP servers established on each computer.

Without an HTTP server, the only way to differentiate between your domains is via open ports on your router that will be forwarded to the right computer.

For example,

  • point domain.com:5000 to 192.168.1.10:5000
  • point domain2.com:5001 to 192.168.1.10:5001

In that situation, one domain name is enough.

2
  • Thank you for your detailed answer. How can I make the forwarding from one HTTP to another? That would be enought for me if I could manage to: open domain.com:80 on 192.168.1.10:80 & open domain2.com:80 on 192.168.1.11:80. I mean the webs hosted on those servers. Oct 16, 2018 at 12:48
  • That's the part that the router cannot do, since it is addressed by IP and not by DNS/name. You need it to be ports 80 and 81, or alternatively two routers with two different connections to the Internet, or one router with two parallel network interfaces.
    – harrymc
    Oct 16, 2018 at 12:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .