Review of firewall script
Hi
I have attached my firewall script, basically creates a DB of rules, also creates a default set of rules.
structure is
DB base - defaults to /etc/firewall
DB
filter INPUT OUTPUT .... nat .... mangle ....
DB6
filter
mangle
Any comments ?
Alex
Quoted 6 lines · Alexander Samad
Hi
I have attached my firewall script, basically creates a DB of rules, also creates a default set of rules.
Any comments ?
It's long, it's complicated, and it contains some regexes which I don't even want to think about.
If you get some problems, by all means post the output of "iptables -L -nvx; iptables -L -t nat -nvx" and tell us what the problems are, but I think this script is in such a nonstandard form that not many people here are going to spend the time looking through it and trying to see if there are any security holes.
That's my opinion, anyhow.... (happy for someone else to show I'm wrong)
Regards,
Antony.
Signature · 4 lines
If at first you don't succeed, destroy all the evidence that you tried.
Please reply to the list;
please don't CC me.Quoted 9 lines · Antony Stone
Quoted 6 lines · Alexander Samad
Hi
I have attached my firewall script, basically creates a DB of rules, also creates a default set of rules.
Any comments ?
Quoted 8 lines
It's long, it's complicated, and it contains some regexes which I don't even want to think about.
If you get some problems, by all means post the output of "iptables -L -nvx; iptables -L -t nat -nvx" and tell us what the problems are, but I think this script is in such a nonstandard form that not many people here are going to spend the time looking through it and trying to see if there are any security holes.
Yeah true, it builds a db and you can run the script against the db to build the tables. Usually use it on new box to create a default DB of rules and then play from there, normal sequence
makefirewall makeall
makefirewall setsecurity
makefirewall showtables | less
Quoted 15 lines
That's my opinion, anyhow.... (happy for someone else to show I'm wrong)
Regards,
Antony.
Signature · 4 lines
If at first you don't succeed, destroy all the evidence that you tried. Please reply to the list; please don't CC me.