IPTables Port forwarding question - special case
I am new to linux/iptables so I used this script generator to create a basic firewall script.
This is working ok, but I would also like to do some forwarding, and I can't find any examples that fit my setup.
I get my Internet connection via a broadband router that I cannot configure myself. From my ISP, it is configured to forward all ports to ip 192.168.0.30. This means that if I configure my Linux box with this IP-address, it gets all incoming traffic. So far, so good. I have also connected another computer (WinXP) on this subnet with ip-address 192.168.0.2. On this I have a ftp-server (which I plan to move, but havent yet) and also use some P2P software (BitTorrent). For this purpose, I would like to forward some ports to this machine.
Can someone please help me with the correct iptables commands for this?
I have tried the following to forward http to my XP box (it also has IIS) but it doesnt work.
$IPT -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.0.2:80
$IPT -A FORWARD -p tcp -d 192.168.0.2 --dport 80 -j ACCEPT