Hacker News new | ask | show | jobs
by die_sekte 5784 days ago
I used iptables to block all incoming traffic. While SSHed into the server. Thankfully, Linode's out of band console works (slow and painful, but it worked).
3 comments

I did this as a result of following a (poorly-conceived) iptables tutorial.

'Step one: configure iptables to deny traffic by default: iptables -P INPUT DROP'

There's also the time that I learned why you should think twice before setting a default policy of DROP or REJECT - iptables -F will clear all rules that allow you in, but not the default policy that keeps you out.

funny but that sounds like a rite of passage when learning how to configure iptables :)
I've started using CSF instead of iptables since it's default adds the IP you installed it from to it's whitelist. Along with it's "testing" mode which clears the iptables rules by default every 5 minutes, it's pretty hard to lock yourself out with it.