port forwarding not working
Posted: 19. May 2009, 18:11
Hi All,
This is my first post. I have the setup below:
Host: Ubuntu 8.04 32 bit (client)
Guest: Slackware 12.1 (server with apache, mysql, ...)
The host has 192.168.1.100 fixed and the Guest has 192.168.1.200
I'm trying to redirect all incoming tcp/ip requests to 192.168.1.100 to be redirect to my 192.168.1.200 that is my Guest operation system installed in virtualbox. I used the following commands:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.1.200
iptables -t nat -A POSTROUTING -p tcp -d 192.168.1.200 --dport 80 -j MASQUERADE
In VirtualBox the network is configured to host interface (eth0)
I'm able to ping 192.168.1.200 from 192.168.1.100 and I'm also able to open a browser and type http://192.168.1.200 so that apache welcome page is displayed.
But whenever I try to use http://192.168.1.100 it keeps trying to search and then gives timeout saying the page could not be displayed.
What I'm doing wrong?
Thanks howler
This is my first post. I have the setup below:
Host: Ubuntu 8.04 32 bit (client)
Guest: Slackware 12.1 (server with apache, mysql, ...)
The host has 192.168.1.100 fixed and the Guest has 192.168.1.200
I'm trying to redirect all incoming tcp/ip requests to 192.168.1.100 to be redirect to my 192.168.1.200 that is my Guest operation system installed in virtualbox. I used the following commands:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.1.200
iptables -t nat -A POSTROUTING -p tcp -d 192.168.1.200 --dport 80 -j MASQUERADE
In VirtualBox the network is configured to host interface (eth0)
I'm able to ping 192.168.1.200 from 192.168.1.100 and I'm also able to open a browser and type http://192.168.1.200 so that apache welcome page is displayed.
But whenever I try to use http://192.168.1.100 it keeps trying to search and then gives timeout saying the page could not be displayed.
What I'm doing wrong?
Thanks howler