ipchains rejection based on flags
how do i use ipchains to where i can accept or reject packets based on the flags that are set as they pass through the firewall? making judgements based on if SYN or FIN is set or not? and also on the certain combonations that are set.
|
To my knowledge, ipchains can only filter tcp flags as being either SYN or not SYN (meaning everything else). To match SYN packets use the -y option:
ipchains -A input -p tcp -y -j ACCEPT to match everything but SYN: ipchains -A input -p tcp ! -y -j ACCEPT I don't believe that ipchains can match any other tcp flags. Ipfwadmin had a -k match for ack packets, but I don't think that got supported in ipchains. If you want to do complex packet filtering, I would recommend switching to iptables instead. You can match any tcp flags you want and you'll get statefull firewalling as well. If you want more info on ipchains, you can take a look at the ipchains howto from tldp: http://www.tldp.org/HOWTO/IPCHAINS-HOWTO.html#toc4 |
All times are GMT -5. The time now is 08:17 PM. |