0

I have many PC in my LAN. Every PC has a web server on port 80. Every pc also have some other services, like SSH.

I have the need to allow access to these servers from outside the LAN, but opening only one port , or two, but not 40!. I created a third domain for each server, each as CNAME of the same IP as follows.

 openvpn.mydomain.tld - 81.23.12.1 - 192.168.1.227:80
 pihole2.mydomain.tld - 81.23.12.1 - 192.168.1.228:80
 ssh1.mydomain.tld - 81.23.12.1 - 192.168.1.228:22
 .... Etc....

I would like that browsing to openvpn.mydomain.tld I could see webpage from the webserver at 192.168.1.227 listening at port 80, and so on.

  • What kind of tools allow me to route incoming traffic to different LAN IP based on requested domain name and port?

Note: I do not have a professional router.

  • Is it possible to route traffic using only software? If yes, which "kind" of software?
  • haproxy.org/#docs – chicks Aug 16 '18 at 20:43
  • 1
    You know how to do vhost for local sites, that's the same for remote sites, that's called a reverse proxy, you just define a proxy to transmit the request to another server instead of a directory – Tensibai Aug 16 '18 at 21:58
  • 1
    The question is not clear and some technical explanations are wrong. Please correct them. – Chaminda Bandara Aug 17 '18 at 16:52
  • Question simplified to remove smoke. I hope is more precise. I would like a lot an answer with some details or an example about haproxy. It looks like exactly what I need. – realtebo Aug 19 '18 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.