Redirecting ports - not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Here is my situation: i have a slackware box running a virtual machine under vmware. The virtual machine is a Windows 2003 server. In my server, i have 2 devices: eth0, vith the static/valid ip adress, and eth1 with my local network adress (192.168.0.0). The virtual machine gets the following ip adress: 192.168.237.128 and can ping the internet (i configure the virtual machine bridged with eth1, no problem).

What i want: redirect the traffic from port 80 of my linux (eth0, valid adress) to the virtual machine (192.168.237.128).

I've tryed the following solution:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.237.128:80
iptables -t nat -A POSTROUTING -s 192.168.237.128 -p tcp -j SNAT --to <my valid ip adress>

But it doesn't work. I see this in the /proc/net/ip_conntrack :

tcp      6 111 SYN_SENT src=<ip_of_my_remote_box> dst=<ip_of_eth0(valid adress)> sport=42560 dport=80 [UNREPLIED] src=192.168.237.128 dst=<ip_of_my_remote_box> sport=80 dport=42560 use=1

Please... who can welp me? I spent 2 days in this problem ;)

Thanx in advance... and sorry for the bad english :)

André Aun




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux