Iptables

From I Will Fear No Evil
Jump to navigation Jump to search

iptables notes

Just some generic notes on working with IP tables. Can be a PITA when an issue is happening to remember the details..

REMEMBER: You can block YOURSELF if you do not use your head!

Dont block:

  • Internal IP address
  • YOURSELF external IP address (if logging in via public interfaces)
  • Loopbacks... Not sure what would happen but expect it would brick things..

Simple blocks

  • iptables -A INPUT -s 47.245.124.200 -j DROP

Reminders:

  • This will not persist across reboots
  • setup of fail2ban would be a heck of a lot easier than manual blocking
  • iptables -L -n is your friend