Page 1 of 1

Firewall revert on shutdown

Posted: 11 Aug 2014, 15:56
by iqtrm
Hi.

I ran through Connect your B3 as a wireless device to an access point on the wiki.
and all seems good until I shutdown my B3wifi and move it away from to router.

Rerunning

Code: Select all

iptables -A INPUT -i wlan0 -j ACCEPT

fixes the problem of not being able to access the B3 through wlan0.
What do I need to do to permanently set the firewall rules?

Re: Firewall revert on shutdown

Posted: 12 Aug 2014, 04:07
by Gordon
The normal behaviour of the B3 is to save the current active firewall rules on shutdown. You didn't pull the plug while it was still running, did you?

Re: Firewall revert on shutdown

Posted: 12 Aug 2014, 04:32
by iqtrm
Nope, I shut it down from webGUI and pulled the plug after everything was quiet and dark.
Trying to connect now after it has been powered continuously it seems to have reverted the settings again.
I can connect to 192.168.1.70 (Ethernet), but not to 192.168.1.65 (wifi).

Re: Firewall revert on shutdown

Posted: 12 Aug 2014, 04:37
by iqtrm
No, shutdown from gui and waited until everything was dark and quiet.
Rules are reverting even when the B3 is running.

Re: Firewall revert on shutdown

Posted: 12 Aug 2014, 11:15
by Gordon
Then apparently you must be receiving a very short lease from DHCP on your WAN interface. This causes a firewall restore (long story, but it actually makes sense). You can force saving the current firewall rules at any time by running either `/etc/init.d/bubba-firewall stop` (which does not actually stop the firewall) or `iptables-save >/etc/network/firewall.conf`.

Re: Firewall revert on shutdown

Posted: 16 Aug 2014, 16:34
by iqtrm
iptables-save did the trick. thank you very much!