View previous topic :: View next topic |
Author |
Message |
mansniks Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 19 Nov 2007 Posts: 290
|
Posted: Mon Oct 27, 2008 2:13 pm Post subject: Save netfilter / router settings for reboot? |
|
|
Please tell me how should it be done? I can add something with iptables, but it disappears after reboot..
So I have to make my own script or there is some automation already? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spindle Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 01 Dec 2003 Posts: 245
|
Posted: Mon Oct 27, 2008 2:20 pm Post subject: |
|
|
This should do it when you have the way you want it configured.
Code: | # /etc/init.d/iptables save |
Also don't forget to add it to rc if you haven't already.
Code: | # rc-update add iptables default |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mansniks Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 19 Nov 2007 Posts: 290
|
Posted: Mon Oct 27, 2008 2:44 pm Post subject: |
|
|
Thank you.
But I have another question: how can I edit and review those rules normally? Only by making that script, which was omit at first? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spindle Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 01 Dec 2003 Posts: 245
|
Posted: Thu Oct 30, 2008 11:11 pm Post subject: |
|
|
I just use the iptables command. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mansniks Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 19 Nov 2007 Posts: 290
|
Posted: Fri Oct 31, 2008 10:45 am Post subject: |
|
|
Well, I ended up writing script, that resets all the rules and closes firewall, then adds rules from a fresh. Then I save with /etc/.. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|