Consulting some redirect port with windows to a iptables firewall

Nov 06, 2004 1 Replies

Hi!



I have a firewall with iptables redirecting some port to a LAN machine.



I'm using this rules:


10.1.1.2= ip LAN machine

=============================================================== iptables -A INPUT -p tcp --dport 2021 -j ACCEPT iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 2021 -j DNAT --to



10.1.1.2:2021 iptables -A FORWARD -i eth0 -p tcp -d 10.1.1.2 --dport 2021 -j ACCEPT

iptables -A INPUT -p tcp --dport 3333 -j ACCEPT iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 3333 -j DNAT --to



10.1.1.2:3333 iptables -A FORWARD -i eth0 -p tcp -d 10.1.1.2 --dport 3333 -j ACCEPT

iptables -A INPUT -p udp --dport 2001 -j ACCEPT iptables -t nat -A PREROUTING -p udp -i eth0 --dport 2001 -j DNAT --to



10.1.1.2:2001 iptables -A FORWARD -i eth0 -p udp -d 10.1.1.2 --dport 2021 -j ACCEPT

==============================================================



When i consult the external IP thats ports with telnet in windows from outside, can obtain response; but when consult with telnet in linux from outside, i obtain satisfatory response.



I cant understand what happen!!!!! exist some differences between windows and linux telnet? or i need make some change in the firewall rules (i dont think so).



Thanks for your help!



Bye obtain response;



You need to decide what you want to do. Accept those ports into the firewall itself, or forward it to your LAN computer. I suspect using the last two lines is what you want.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required