What's new

Solved YazFi settings not persisting across reboots

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

DTS

Regular Contributor
I am thankful this forum told me about YazFi. It's a very useful add-on! I just started using it yesterday. It was working as expected after I followed the install instructions. I had the GUI tab under Guest Network too.

My main goal is that all guests have IP addresses on 192.168.20.X so my VPN Director rule will work as expected. This worked.

After rebooting my router, I am having two issues:

1. The settings are not applied after the router reboots (specifically, guests do not get assigned the intended IP address anymore)
2. I don't have the GUI tab under Guest Network anymore

I do not see any errors in the system log. I have 5 VPN clients, and these are the only log lines that mention YazFi:

Code:
Dec  4 01:54:23 YazFi: VPN tunnel route just came up, running YazFi to fix RPDB routing
Dec  4 01:54:24 YazFi: VPN tunnel route just came up, running YazFi to fix RPDB routing
Dec  4 01:54:25 YazFi: VPN tunnel route just came up, running YazFi to fix RPDB routing
Dec  4 01:54:26 YazFi: VPN tunnel route just came up, running YazFi to fix RPDB routing
Dec  4 01:54:27 YazFi: VPN tunnel route just came up, running YazFi to fix RPDB routing

After checking the system log via the GUI, I ssh'd into the router.

Code:
/tmp/home/root# cat /jffs/addons/custom_settings.txt
yazfi_version_local v4.3.4
yazfi_version_server v4.3.4

I ran `/jffs/scripts/YazFi` then picked option 2. Result was:

Code:
Querying router for connected WiFi clients...

---------------------------------------------------------------------------

INTERFACE: wl0.2
SSID: My2G-Guest

HOSTNAME                      IP                  MAC                 CONNECTED      RX/TX          RSSI      PHY
Unknown                       192.168.10.191      AA:BB:CC:DD:EE:FF   0h:14m:50s     1/192 Mbps     -43 dBm   n
---------------------------------------------------------------------------

Query complete, please see above for results

As this shows, the guest has the wrong IP address. My YazFi settings were not applied.

I ran the same command again within a few seconds and there was not guest connected. Then I ran it again now my YazFi settings are taking effect. I did not do any other commands. All I did was

1. start YazFi via CLI
2. query for connected WiFi clients three times.

This shows the issue fixed itself.

Code:
Querying router for connected WiFi clients...

---------------------------------------------------------------------------

INTERFACE: wl0.2
SSID: My2G-Guest

HOSTNAME                      IP                  MAC                 CONNECTED      RX/TX          RSSI      PHY
Unknown                       192.168.20.221      AA:BB:CC:DD:EE:FF   0h:0m:21s      1/173 Mbps     -48 dBm   n
---------------------------------------------------------------------------

Query complete, please see above for results

Press enter to continue...

The IP address is correct now. If I disconnect the guess and reconnect, it again gets the correct IP address. But after I reboot the router, I am back to square one. If I do the query for connected WiFi clients via CLI, the issue is once again fixed.

My only enabled guest network is "Guest Network 2 (wl0.2)" as shown below.

Code:
/tmp/home/root# cat  /jffs/addons/YazFi.d/config
####################################################################
######                   YazFi Configuration                  ######
####################################################################
#                  User Variables - edit as needed                 #
#                                                                  #
#            You must configure the Guest Network(s) in            #
#              the router GUI before using this script             #
#                                                                  #
#            N.B. Currently hardcoded to a 255.255.255.0           #
#            subnet, so DHCP pool can start at a minimum           #
#               of X.Y.Z.2 and a maximum of X.Y.Z.254              #
#                                                                  #
####################################################################
######                    2.4 GHz Networks                    ######
####################################################################
######                 Guest Network 1 (wl0.1)                 #####
####################################################################
wl01_ENABLED=false
wl01_IPADDR=192.168.2.0
wl01_DHCPSTART=2
wl01_DHCPEND=254
wl01_DNS1=192.168.2.1
wl01_DNS2=192.168.2.1
wl01_FORCEDNS=false
wl01_REDIRECTALLTOVPN=false
wl01_VPNCLIENTNUMBER=1
wl01_TWOWAYTOGUEST=false
wl01_ONEWAYTOGUEST=false
wl01_CLIENTISOLATION=false
####################################################################
######                 Guest Network 2 (wl0.2)                 #####
####################################################################
wl02_ENABLED=true
wl02_IPADDR=192.168.20.0
wl02_DHCPSTART=2
wl02_DHCPEND=254
wl02_DNS1=1.1.1.1
wl02_DNS2=1.1.1.1
wl02_FORCEDNS=true
wl02_REDIRECTALLTOVPN=false
wl02_VPNCLIENTNUMBER=1
wl02_TWOWAYTOGUEST=false
wl02_ONEWAYTOGUEST=false
wl02_CLIENTISOLATION=true
####################################################################
######                 Guest Network 3 (wl0.3)                 #####
####################################################################
wl03_ENABLED=false
wl03_IPADDR=192.168.4.0
wl03_DHCPSTART=2
wl03_DHCPEND=254
wl03_DNS1=8.8.8.8
wl03_DNS2=8.8.4.4
wl03_FORCEDNS=false
wl03_REDIRECTALLTOVPN=false
wl03_VPNCLIENTNUMBER=1
wl03_TWOWAYTOGUEST=false
wl03_ONEWAYTOGUEST=false
wl03_CLIENTISOLATION=false
####################################################################
######                     5 GHz Networks                     ######
####################################################################
######                 Guest Network 1 (wl1.1)                 #####
####################################################################
wl11_ENABLED=false
wl11_IPADDR=192.168.5.0
wl11_DHCPSTART=2
wl11_DHCPEND=254
wl11_DNS1=8.8.8.8
wl11_DNS2=8.8.4.4
wl11_FORCEDNS=false
wl11_REDIRECTALLTOVPN=false
wl11_VPNCLIENTNUMBER=1
wl11_TWOWAYTOGUEST=false
wl11_ONEWAYTOGUEST=false
wl11_CLIENTISOLATION=false
####################################################################
######                 Guest Network 2 (wl1.2)                 #####
####################################################################
wl12_ENABLED=false
wl12_IPADDR=192.168.6.0
wl12_DHCPSTART=2
wl12_DHCPEND=254
wl12_DNS1=8.8.8.8
wl12_DNS2=8.8.4.4
wl12_FORCEDNS=false
wl12_REDIRECTALLTOVPN=false
wl12_VPNCLIENTNUMBER=1
wl12_TWOWAYTOGUEST=false
wl12_ONEWAYTOGUEST=false
wl12_CLIENTISOLATION=false
####################################################################
######                 Guest Network 3 (wl1.3)                 #####
####################################################################
wl13_ENABLED=false
wl13_IPADDR=192.168.7.0
wl13_DHCPSTART=2
wl13_DHCPEND=254
wl13_DNS1=8.8.8.8
wl13_DNS2=8.8.4.4
wl13_FORCEDNS=false
wl13_REDIRECTALLTOVPN=false
wl13_VPNCLIENTNUMBER=2
wl13_TWOWAYTOGUEST=false
wl13_ONEWAYTOGUEST=false
wl13_CLIENTISOLATION=false
####################################################################
######                    5 GHz - 2 Networks                  ######
######     (for those with 2 5GHz radios, e.g. RT-AC5300)     ######
####################################################################
######                 Guest Network 1 (wl2.1)                 #####
####################################################################
wl21_ENABLED=false
wl21_IPADDR=192.168.8.0
wl21_DHCPSTART=2
wl21_DHCPEND=254
wl21_DNS1=8.8.8.8
wl21_DNS2=8.8.4.4
wl21_FORCEDNS=false
wl21_REDIRECTALLTOVPN=false
wl21_VPNCLIENTNUMBER=1
wl21_TWOWAYTOGUEST=false
wl21_ONEWAYTOGUEST=false
wl21_CLIENTISOLATION=false
####################################################################
######                 Guest Network 2 (wl2.2)                 #####
####################################################################
wl22_ENABLED=false
wl22_IPADDR=192.168.9.0
wl22_DHCPSTART=2
wl22_DHCPEND=254
wl22_DNS1=8.8.8.8
wl22_DNS2=8.8.4.4
wl22_FORCEDNS=false
wl22_REDIRECTALLTOVPN=false
wl22_VPNCLIENTNUMBER=1
wl22_TWOWAYTOGUEST=false
wl22_ONEWAYTOGUEST=false
wl22_CLIENTISOLATION=false
####################################################################
######                 Guest Network 3 (wl2.3)                 #####
####################################################################
wl23_ENABLED=false
wl23_IPADDR=192.168.10.0
wl23_DHCPSTART=2
wl23_DHCPEND=254
wl23_DNS1=8.8.8.8
wl23_DNS2=8.8.4.4
wl23_FORCEDNS=false
wl23_REDIRECTALLTOVPN=false
wl23_VPNCLIENTNUMBER=1
wl23_TWOWAYTOGUEST=false
wl23_ONEWAYTOGUEST=false
wl23_CLIENTISOLATION=false
####################################################################
 
I just noticed this as well:

Code:
/tmp/home/root# /jffs/scripts/YazFi
sed: /tmp/menuTree.js: No such file or directory
WebUI for YazFi is available at:
WebUI page not found
 
When I install YazFi (I don't use it myself, I'm just doing so for testing purposes), it adds the following to the end of my existing /jffs/scripts/services-start script.

Code:
/jffs/scripts/YazFi startup & # YazFi

Seems to me that's a bit risky, esp. if the existing script issues an exit command before that line is reached. Or perhaps establishes an infinite loop. It's one of the reasons I don't allow any of my own scripts to modify any existing user scripts.

I'm just wondering if maybe that's the reason it's (apparently) NOT starting. Obviously if you didn't have a pre-existing services-start script, it's not relevant. But given the number of scripts being used w/ Merlin these days, these types of possible clashes have to be considered.

Ultimately, @Jack Yaz is the authority on his own scripts. Anything I have to add is just pure speculation.
 
When I install YazFi (I don't use it myself, I'm just doing so for testing purposes), it adds the following to the end of my existing /jffs/scripts/services-start script.

Code:
/jffs/scripts/YazFi startup & # YazFi

Seems to me that's a bit risky, esp. if the existing script issues an exit command before that line is reached. Or perhaps establishes an infinite loop. It's one of the reasons I don't allow any of my own scripts to modify any existing user scripts.

I'm just wondering if maybe that's the reason it's (apparently) NOT starting. Obviously if you didn't have a pre-existing services-start script, it's not relevant. But given the number of scripts being used w/ Merlin these days, these types of possible clashes have to be considered.
Wow, you are a great troubleshooter!
You nailed this one.
 
When I install YazFi (I don't use it myself, I'm just doing so for testing purposes), it adds the following to the end of my existing /jffs/scripts/services-start script.

Code:
/jffs/scripts/YazFi startup & # YazFi

Seems to me that's a bit risky, esp. if the existing script issues an exit command before that line is reached. Or perhaps establishes an infinite loop. It's one of the reasons I don't allow any of my own scripts to modify any existing user scripts.

I'm just wondering if maybe that's the reason it's (apparently) NOT starting. Obviously if you didn't have a pre-existing services-start script, it's not relevant. But given the number of scripts being used w/ Merlin these days, these types of possible clashes have to be considered.

Ultimately, @Jack Yaz is the authority on his own scripts. Anything I have to add is just pure speculation.
one of the culprit scripts in issuing an undesired "exit" command is NextDNS (a paid service). The devs weren't willing to change this behaviour, so YazFi (and perhaps other scripts of mine) scan for NextDNS and remove it's exit line to prevent conflicts with my addons, and those of other devs
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top