Do i need to restore iptable rules everytime on boot?

Posted by capdragon on Ask Ubuntu See other posts from Ask Ubuntu or by capdragon
Published on 2012-03-29T20:55:17Z Indexed on 2012/03/29 23:41 UTC
Read the original article Hit count: 165

Filed under:

Every time i reboot i loose the iptables rules that took me sooo long to enter. I know i can save them and restore them on boot but is there anyway to save them forever? Do i really need to restore them on boot every time? Seriously?

The problem is I have a HUGE list of IPs in which i use a while loop to load them in. This can take upwards of 10 minutes.

This is my home FTP server. It's a small vm with 1gb ram and very little processing power. There are so many IPs because I've pretty much given up on the Asian continent. I don't need them to be hitting up my ftp server everyday with brute force. I also block gov. monitors, trackers and spammers.

This is the while loop i use to load in the list.

grep INPUT block.list | while read LISTA; do sudo iptables -A $LISTA; done

© Ask Ubuntu or respective owner

Related posts about iptables