opentechinstitute / commotion-router

The build system for the OpenWRT-based Commotion firmware.
https://commotionwireless.net
GNU General Public License v3.0
121 stars 43 forks source link

Custom iptables firewall rules not being applied. #156

Closed BigJ64 closed 10 years ago

BigJ64 commented 10 years ago

In working to add custom iptables firewall rules into commotion I stumbled on the "Custom Rules" page in the Firewall section of the Advanced config. I added my iptables rules and reset the firewall only to find that the rules had not been applied. I logged in and applied my iptables rules manually to double check syntax and they worked as designed. I found that the file this section was editing was the /etc/firewall.user file. After some more investigation these seams to be a standard file used for adding custom firewall rules in OpenWRT but that it needed to be included in the UCI firewall config file with the following included statement:

config include option path /etc/firewall.user

These lines were missing from the UCI firewall config file located at /etc/config/firewall. Once these lines were added the firewall.user file was included as described it would be and all iptables rules were applied successfully.

dismantl commented 10 years ago

I think it would make sense to add that to the default firewall config. Would you like to make a pull request with that change?

jheretic commented 10 years ago

Addressed by https://github.com/opentechinstitute/commotion-router/pull/157