New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Firewall revert on shutdown

Got problems with your B2 or B3? Share and get helped!
Post Reply
iqtrm
Posts: 5
Joined: 11 Aug 2014, 15:46

Firewall revert on shutdown

Post 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?
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Firewall revert on shutdown

Post 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?
iqtrm
Posts: 5
Joined: 11 Aug 2014, 15:46

Re: Firewall revert on shutdown

Post 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).
iqtrm
Posts: 5
Joined: 11 Aug 2014, 15:46

Re: Firewall revert on shutdown

Post by iqtrm »

No, shutdown from gui and waited until everything was dark and quiet.
Rules are reverting even when the B3 is running.
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Firewall revert on shutdown

Post 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`.
iqtrm
Posts: 5
Joined: 11 Aug 2014, 15:46

Re: Firewall revert on shutdown

Post by iqtrm »

iptables-save did the trick. thank you very much!
Post Reply