iptables and remote desktop
I need to get access to remote desktop (port 3389) on an xp machine which is behind a linux iptables firewall. The two rules I used:
iptables -A FORWARD -i eth1 -o eth0 -p tcp --dport 3389 -d 192.168.1.251 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp -i eth1 --dport 3389 -j DNAT --to 192.168.1.251:3389
and ip_forward is enabled
cat /proc/sys/net/ipv4/ip_forward
1
But I had no sucess. Can someone please help me.
Bellow I am sending iptables -vnL and iptables -t nat -vnL (to make everyhing easier the above stated two rules are the only ones I entered into iptables)
iptables -vnL
Chain INPUT (policy ACCEPT 111 packets, 10247 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- eth1 eth0 0.0.0.0/0 192.168.1.251 tcp dpt:3389
Chain OUTPUT (policy ACCEPT 115 packets, 9888 bytes)
pkts bytes target prot opt in out source destination
iptables -t nat -vnL
Chain PREROUTING (policy ACCEPT 4 packets, 634 bytes)
pkts bytes target prot opt in out source destination
0 0 DNAT tcp -- eth1 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3389 to:192.168.1.251:3389
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
|