A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.
traffic redirection by domain name to external addresses
We using Linux CentOS.
For example - we have 3 hosts - host1.domain.com, host2.domain.com, host3.domain.com. Hosts connected via VPN.
Task: host1.domain.com must be a gateway for http/https traffic, and redirect requestes to host2.domain.com and host3.domain.com.
host1.domain.com will have external IP and accepts request on 80 port.
host2.domain.com and host3.domain.com - internal IP and accepts request on 8080 and 8443 ports.
How this can be realised? IPTABLES, NGINX, something else?
And - what about other traffic? SSH, samba etc.