Some time ago I've upgraded YazFi to 4.4.5 (develop) version to address the WebUI not scrolling properly issue. After that I started to see clients on my guest network being disconnected every 10 minutes so I started debugging what's the reason - in the logs I found that YazFi check mechanism is triggering reconfiguration due to "firewall rules not detected during persistence check, re-applying rules".
Digging down I found out that checking code was improved between 4.4.4 and 4.4.5.
4.4.4 version:
4.4.5 version:
And the new code detects that YazFi nat rules are gone and reconfigures guest networks.
I started to monitor iptables and after reconfiguration the rules are getting overwritten in ~2-8 minutes, so every YazFi check triggers reconfiguration mechanism to restore the nat rules.
Only nat rules are affected, filtering rules are persistent.
I temporarily reverted this change on my router and I don't see negative effects, but I might be missing something. Here are the settings being wiped out:
Anyone else experienced such issue? Chatgpt told me that ASUS FW might be overwriting the rules. I cannot figure out what application does that and the only correlation I found, but I'm not 100% certain, is the entry in the log file:
Any ideas how to fix it properly are much appreciated.
Regards
KB
Digging down I found out that checking code was improved between 4.4.4 and 4.4.5.
4.4.4 version:
Bash:
if ! iptables -nL | grep -q "YazFi"; then
Check_Lock
Print_Output true "$SCRIPT_NAME firewall rules not detected during persistence check, re-applying rules" "$WARN"
Config_Networks
Clear_Lock
exit 0
fi
Bash:
##----------------------------------------##
## Modified by Martinski W. [2024-Jan-06] ##
##----------------------------------------##
if echo "$IFACELIST" | grep -qE "wl[0-3][.][1-3]" && \
{ ! iptables -t nat -nL | grep -q "YazFi" || \
! iptables -t nat -nL | grep -wq "YazFi" || \
! iptables -t filter -nL | grep -q "YazFi" || \
! iptables -t filter -nL | grep -wq "YazFi"
}
then
Check_Lock
Print_Output true "$SCRIPT_NAME firewall rules were not detected during persistence check, re-applying rules" "$ERR"
Config_Networks
Clear_Lock
exit 0
fi
I started to monitor iptables and after reconfiguration the rules are getting overwritten in ~2-8 minutes, so every YazFi check triggers reconfiguration mechanism to restore the nat rules.
Only nat rules are affected, filtering rules are persistent.
I temporarily reverted this change on my router and I don't see negative effects, but I might be missing something. Here are the settings being wiped out:
Code:
MASQUERADE all -- 192.168.13.0/24 192.168.13.0/24 /* YazFi 2.4GHz 3 */
MASQUERADE all -- 192.168.13.0/24 192.168.2.0/24 /* YazFi 2.4GHz 3 to LAN */
MASQUERADE all -- 192.168.2.0/24 192.168.13.0/24 /* LAN to YazFi 2.4GHz 3 */
MASQUERADE all -- 192.168.12.0/24 192.168.12.0/24 /* YazFi 2.4GHz 2 */
MASQUERADE all -- 192.168.12.0/24 192.168.2.0/24 /* YazFi 2.4GHz 2 to LAN */
MASQUERADE all -- 192.168.2.0/24 192.168.12.0/24 /* LAN to YazFi 2.4GHz 2 */
MASQUERADE all -- 192.168.11.0/24 192.168.11.0/24 /* YazFi 2.4GHz 1 */
Anyone else experienced such issue? Chatgpt told me that ASUS FW might be overwriting the rules. I cannot figure out what application does that and the only correlation I found, but I'm not 100% certain, is the entry in the log file:
Code:
log: router WAN_Connection: WAN was restored.
Any ideas how to fix it properly are much appreciated.
Regards
KB