ip-pre-up.d
I've written a script to set up a firewall before the interfaces come up.
The script is saved as /etc/network/if-pre-up.d/00-firewall I've added a line with logger, just to see when it is executed and now that line is repeated 4 times. I guess it might be because I've got 4 ip interfaces. how can I prevent that? |
Pretending that you are using a debian system check the man page of interfaces and see if the mapping rule can help you to only run your firewall script ones. Or edit your script in /etc/network/if-pre-up.d and insert a check for the devices and only run the script if the device fits.
|
man interfaces did help, thanks
sometimes I just don't try all the man pages because I don't believe there would be an entry for stuff. I tried man network and man if-pre-up without any luck. I think I'll be able to do something with the variables mentioned in interfaces. |
Sometime one does not see the woods for the trees. If you hitting any dead spots or having more question just post and I'll see what I can do.
|
Thanks for that offer. I might take you up on it.
|
All times are GMT -5. The time now is 12:17 AM. |