Server Security Made Easy: Fortifying with iptables and Knockd
Too Long; Didn't Read
I'll show you how to set up a firewall and lockdown the whole server for anyone to access. You can use knockd, where a special sequence will open the port for just that IP address. First, make a file called iptables.sh and copy the following into /etc/knockd.conf.