Save Iptables Rules and Load on Boot?

Status
Not open for further replies.

mneylon

Administrator
Staff member
#1
I've a few rules in iptables that I need to set on boot eg. blocking certain IP ranges entirely

What's the sanest way of doing this? (Servers are running Debian or Ubuntu)
 

mneylon

Administrator
Staff member
#3
Thanks Bob - I've got a load of sysadmins that do this stuff for company servers, but getting them to do stuff for my personal ones can be hard at times :)
 
#4
I would convert the rules to iptables commands, test them, and put it at the end of the file "/etc/rc.d/rc.local" (on RedHatish distros) or "/etc/rc.local" (in Debianish ones).
Then they will be executed following a reboot after everything else is being set up, so they will stick.
 
Status
Not open for further replies.
Award-winning Mac antivirus and Internet security software
Top