Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got a strange port forwarding problem.

The port forwarding to my internal webserver (10.0.0.10 on Port 80) works without a problem but the port forwarding to a windows server (10.0.0.15) on port 3389 doesn't work. The port 3389 is open.

Any ideas? thanks!

#!/bin/sh
IPTABLES="/sbin/iptables"

$IPTABLES --flush
$IPTABLES --table nat --flush
$IPTABLES --delete-chain
$IPTABLES --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
$IPTABLES -t nat -A PREROUTING -p tcp -i eth0 -d 188.40.XXX.XXX --dport 3389 -j DNAT --to 10.0.0.15:3389
$IPTABLES -t nat -A PREROUTING -p tcp -i eth0 -d 188.40.XXX.XXX --dport 80 -j DNAT --to 10.0.0.10:80
$IPTABLES -t nat -A PREROUTING -p tcp -i eth0 -d 188.40.XXX.XXX --dport 222 -j DNAT --to 10.0.0.10:22
$IPTABLES --append FORWARD --in-interface eth1 -j ACCEPT
share|improve this question

1 Answer 1

up vote 2 down vote accepted

Is the gateway correct on the Windows server?

share|improve this answer
    
going to check this.. –  Henrik P. Hessel Apr 2 '10 at 14:59
    
Okay, d'oh.. that did the trick! –  Henrik P. Hessel Apr 2 '10 at 15:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.