question in iptables
Hi everyone,
I am a beginner in Linux and in the networking but I really want to learn all these stuff. I am trying to do a small network contains three machines. I need to allow a machine X to send messages to machine Y through Z. I should allow all traffic from the X net (say for example from ip 10.1.1.0) to the Y (say ip 20.2.2.0) net in Z iptables. I wrote these rules but I do not know if they are right or wrong. Can any one tell me if these are right, or give me a good reference to read, I will appreciate it so much. Thanks iptables –F iptables –P INPUT DROP iptables –P FORWARD DROP iptables –A FORWARD –i eth0 –p ANY –j ACCEPT iptables –A FORWARD –d 20.2.2.0 –p tcp –-dport 22 –j ACCEPT |
This is a kick ass guide which actually teached me about how iptables works and I still check it for references until nowadays:
http://iptables-tutorial.frozentux.n...-tutorial.html You can also check this example: http://wiki.linuxquestions.org/wiki/..._a_gateway/nat Hopefully you will get it clear after you read the links stated above. |
All times are GMT -5. The time now is 11:47 AM. |