Ugh ipchains

I actually had to use ipchains tonight. I had an old box running an old kernel (2.2.19) and I needed to block someone from attempting to connect to my FTP server.

Since I hadn't used ipchains before I had to come up with the syntax. It's not too complicated but I think I'll note it for easier access in the future. To simply block all connections from a certain IP do the following.

ipchains -I input -p all -s 62.76.195.111 -j REJECT ipchains -I input -p all -s 194.226.169.96 -j REJECT
And then issue:

ipchains -L input To list the newly applied rules.
Leave A Reply
All content licensed under the Creative Commons License