-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firewall needs to be restarted manually #4
Comments
I think I'm getting closer to a solution. This problem is only occurring when I have a constant stream of pings being sent through the connection while I am trying to block it using the access rules. If I stop pinging first and then enable the access rule, it works properly to block the connection. Further research suggests this is caused by the conntrack functionality: One possible explanation why the systemctl AJAX call is ineffective but manually restarting the firewall works is that the AJAX version takes longer, allowing pings to get through during the restart and thus engaging conntrack: If this is the case, I need to find a way to either disable (temporarily) the connection tracking, or find a way to reliably restart the firewall from LuCI. (I need the connection to get blocked even if users are streaming video at the time.) |
I think I've found a workaround. The reason why LuCI's "Save&Apply" button doesn't cause any connections to be blocked, despite the access rules, is because any connections already listed in the conntrack table are allowed. Upon closer inspection, LuCI's AJAX call to A firewall reload will not flush the conntrack table, while a restart will. The best workaround I can think of is to modify /etc/init.d/firewall so reloads flush the table. This uses the utility conntrack with is part of the conntrack-tools package: reload_service() { It appears this will have the side-effect of hanging up any connection using NAT, which is unavoidable if we want to enforce the new firewall access rules. I hope this typing exercise is useful instead of cumbersome to the project maintainer and other users. |
I found that for me if I create rule, it creates appropriate but disabled rule in firewall. |
I am facing the same exact problem. I have to restart the firewall for each new rule which causes all active connections to drop. Anyone to confirm whether this has been fixed in more recent versions ? |
Same Here (using the Turris Omnia Router) |
Same here, using conntrack -F in crontab looks good but drops all connections. |
Hi, |
I'm running this module on up-to-date OpenWrt Chaos Calmer 15.05.
The automatic restart of system and firewall services works correctly after you make any change that would switch the current access from blocked to allowed. For instance, if you uncheck Enable for a rule that current blocks your device.
However, if you make any change that would block current access and then click Save&Apply, it has no effect unless you manually restart the firewall via "/etc/init.d/firewall restart".
I verified that the AJAX call to restart the services is successful after page reload, in both cases.
If there's any further testing I can do help debug this issue, I'm offering my help.
The text was updated successfully, but these errors were encountered: