Fehler bei afwall custom script und Verbindungswechsel

Ich versuche ein paar Empfehlungen umzusetzen.

Vorher per adb shell ausgeführt:

adb shell 'settings put global captive_portal_http_url "http://captiveportal.kuketz.de"'
adb shell 'settings put global captive_portal_https_url "https://captiveportal.kuketz.de"'
adb shell 'settings put global captive_portal_fallback_url "http://captiveportal.kuketz.de"'
adb shell 'settings put global captive_portal_other_fallback_urls "http://captiveportal.kuketz.de"'

Custom script Inhalt (direkt in afwall):

# captive portal
$IPTABLES -A "afwall" -d 46.38.242.112 -p tcp -j ACCEPT
# DNS
$IPTABLES -t nat -I OUTPUT ! -s 192.168.179.0/24 -p tcp --dport 53 -j DNAT --to-destination 116.203.32.217:53 
$IPTABLES -t nat -I OUTPUT ! -s 192.168.179.0/24 -p udp --dport 53 -j DNAT --to-destination 116.203.32.217:53

Es scheint soweit auch zu funktionieren, das x beim WLAN Logo ist weg und der neue DNS wird auch genutzt. Allerdings bekomme ich bei jedem Wechsel der Verbindung (WLAN → Mobile …) eine Fehlermeldung, dass die Regeln nicht übernommen werden konnten. Beim manuellen aktivieren in afwall kommt die Fehlermeldung nicht.

Das device hat Android 7.1.1 mit afwall+ 3.5.3.