Skip to contentSkip to conversation

Placement of Iptable Scripts

DISCUSSION Jack Bowling 1 participant 1 message Jul 5, 2002

lore
Share & tools
lore
#0 lore raw

** Reply to message from [email protected] on Thu, 04 Jul 2002 21:57:16 -0500

Quoted 4 lines

I'm relatively new to iptables and have the following question.

where is the best place to place my iptable bash script so that it loads my iptable chains and rules when my server reboots?

If I'm not mistaken, one of the distinguishing features of iptables viz. ipchains is that iptables is able to define rules for various interfaces (except for ppp?) before those interfaces are brought up on the network. So for maximum security, the best place to put your script is somewhere before the network interfaces are initialized. Some would say that since the time between bringing up the network and loading of the iptables rules (dead last would be if you put your script in rc.local) is small anyway, this issue about loading the iptables rules before the network interfaces comes up is a moot point. However, I bring my ruleset up first and it functions well. I guess I'm just paranoid.

jb