Skip to content
Advertisement

Linux Map many internal IPs to one external IP [closed]

I have one Linux machine with many services which needed to be accessed from outside users, each service has one port, how can i make all these service be accessible by one external public IP?

Thank you.

Advertisement

Answer

Based on this description …

A few VMs on Linux server machine and each using Internal IP which wanna each VM service accessible from outside via one public IP.

The solution is to set up the linux server (running the hypervisor) to use iptables, and then configure iptables to forward connection requests to specific ports on the external IP through to some port on the appropriate internal IP.

Here’s a more detailed description:

There many other relevant sources if you Google for “iptables port forwarding”.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement