[BUG] Mango V2. Custom DNS "Force all clients" option doesn't work after reboot.

I want to report that after reboot the option “Force all clients to use”, in custom DNS settings, stops working with the MT300N-V2.

So everytime I plug the new Mango in I have to click the apply button (GL.inet UI) to make it work again.

I checked the value of $(uci get glconfig.general.force_dns) = ‘yes’ which is correct, so it seems somehow the script firewall.user is not executed successfully on boot.

Firmware version 2.261

Will test and come back to you.

Glad to know that you will test it.

Also I would like to mention another bug as I’ve noticed that auto channel is not working with WiFi. In my /etc/config/wireless file I use option channel ‘auto’ but the new mango always operates at channel 1 instead.

On the other hand the same option works well if I set an specific channel value, for instance option channel ‘6’

Don’t use auto channel in MT300N-V2. It doesn’t work. It is not a bug. It is the setting of the wifi driver.

About the “Force all clients” option, the related script firewall.user is supposed to be executed on boot and firewall restarts but all indicates that in MT300N-V2 the script only runs completely in case of a firewall restart (not to confuse with firewall start or reload)

On the meanwhile (waiting for an update), a middle fix is adding the line ‘/etc/init.d/firewall restart’ to the /etc/rc.local file so as to force the firewall restart right at the end of the boot process.

@alzhao

I update my findings about the /etc/firewall.user script bug .

As this script is executed on boot by the fw3 -q start command in the /etc/init.d/firewall file then I removed the value “-q” that quiets the log feedback to see the execution during the boot process.

It seems that the fw3 start command is executed too soon as I got the following related errors in the log :
Mon Oct 16 18:35:32 2017 user.notice : Warning: Section @zone[0] (lan) cannot resolve device of network ‘lan’
Mon Oct 16 18:35:32 2017 user.notice : Warning: Section @zone[1] (wan) cannot resolve device of network ‘wan’

Mon Oct 16 18:35:32 2017 user.notice : * Running script ‘/etc/firewall.user’
Mon Oct 16 18:35:32 2017 user.notice : ifconfig: br-lan: error fetching interface information: Device not found
Mon Oct 16 18:35:32 2017 user.notice : iptables v1.4.21: option “–to” requires an argument
Mon Oct 16 18:35:32 2017 user.notice : Try iptables -h’ or ‘iptables --help’ for more information.
Mon Oct 16 18:35:32 2017 user.notice : ! Failed with exit code 2

Mon Oct 16 18:35:44 2017 daemon.notice netifd: Interface ‘lan’ is now up
Mon Oct 16 18:35:44 2017 daemon.notice netifd: bridge ‘br-lan’ link is up

Conclusion : The /etc/firewall.user script fails to run on boot with MT300N-V2 because it is executed before the interface lan (device br-lan) is up and ready. Consequently the “Force all clients” option won’t work everytime the minirouter is rebooted

Note: The command fw3 reload which is called when lan is up (firewall hotplug) does not execute the /etc/firewall.user script by default