Linode Forum
https://forum.linode.com/

Step-by-step iptables configuration guide?
https://forum.linode.com/viewtopic.php?f=19&t=7749
Page 1 of 1

Author:  cthorpe [ Thu Sep 15, 2011 4:47 pm ]
Post subject:  Step-by-step iptables configuration guide?

I swear there used to be a step-by-step guide for configuring iptables in the Linode Library. It took you through creating the configuration files, and getting iptables to start up at each boot. Now all I can find is a document that tells you a lot about iptables commands but not how to set everything up for a basic firewall and have it enabled after every boot.

Also, what do we need to do to secure IPv6?

Thanks,

CT

Author:  voidfaction [ Fri Sep 16, 2011 3:14 am ]
Post subject: 

There is a very minimal iptables how to in the linode library.

ip6tables for ipv6.

Author:  Piki [ Fri Sep 16, 2011 2:50 pm ]
Post subject: 

Once you set the iptables rules using the commands in the Linode Library, log in as root and run the following command (or use sudo):
Code:
root@li283-45:~# iptables-save > /root/default.fw

You can change default.fw to whatever you want to call the file. It doesn't need to be in /root either, just put it in a place where nobody can access it.

Some distributions will have the file called "/etc/rc.local", if you have it, you can add the command "iptables-restore /root/default.fw" (remove the quotes), replacing /root/default.fw with the firewall file. It will execute anything in /etc/rc.local at boot. You should also be able to do an init script, though I'm not experienced with writing init scripts, so I'm not going to attempt a sample script in case it messes up for you.

(edited to remove stray code tag)

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/