Results 1 to 2 of 2
hi all,
I am new to iptables and am having a little trouble figuring them out. Using Iptables I am trying to implement the following policy: im trying to permit ...
- 11-03-2007 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 1
iptables and implementing a policy
hi all,
I am new to iptables and am having a little trouble figuring them out. Using Iptables I am trying to implement the following policy: im trying to permit all outgoing connections, permit incoming ICMP, permit incoming ssh, permit incoming finger connections ,and reject all other packets. How can I do this?
Thanks,
Thomas
- 11-03-2007 #2
There are several ways to implement this. Here's one:
I wrote the rules based on what you requested.Code:# iptables -F # iptables -A INPUT -i lo -j ACCEPT # iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT # iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT # iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 79 -j ACCEPT # iptables -A INPUT -p icmp -j ACCEPT # iptables -A INPUT -j REJECT
OUTPUT chain default policy is ACCEPT.
Originally Posted by sportsman667
Why do you want to permit all incoming icmp traffic? Don't you mean just echo requests?
Originally Posted by sportsman667
Why??
Originally Posted by sportsman667
Remember: REJECT sends an error packet back. DROP sends nothing back to the requester (blackhole).
Originally Posted by sportsman667


Reply With Quote