1

"Publishing" services from a NAT to static IP addresses

view story
linux-howto

http://feedproxy.google.com – Hi, I am currently working with a hosted server that has 4 static WAN IP addresses on a single physical interface, KVM installed and 2 virtual machines on static 192.168.xxx.xxx NAT. My objective is to route calls various ports on the 4 static WAN addresses to the ports on the virtual machines. There will not be a 1 to 1 correlation between the external IP address and the virtual machine; ie. port 80 of "WAN IP 1" may be forwarded to "virtual machine 1" port 80, and port 21 may be forwarded to a different machine. How can I accomplish this in the easiest manner. Can I just use iptables to do this? If so, how do I configure it? I have read various articles regarding masquerading, forwarding, pre and post routing, DNAT, and SNAT. And am now thoroughly confused :| . Coming originally from a Windows background, I am not used to this level of functionality or flexibility. Any help would be much appreciated :) Andrei (HowTos)