My host is Ubuntu Karmic i386 Server. I want to run my webserver in a VM. I have configured the VB NAT so that the VM port 80 is mapped to the host 8080 (as host 80 doesn't work). The mapping is done to the localhost IP, but what I need is to map the port 80 of the Internet IP of the host to the port 80 of the VM. So the missing step should be to map the IP:80 to localhost:8080. I have the host FW configured with UFW, rather then iptables. Google says that I need this:
Code: Select all
/sbin/iptables -t nat -A PREROUTING -i eth+ -p tcp –dport 80 -j REDIRECT –to-port 8080
Unfortunately, it doesn't work. I can wget my VM on localhost:8080, but pointing a browser to my IP doesn't work, even if port 80 is open in UFW.
Any clue how to get this done?