GL GUI does not work anymore

Installed tailscale update successfully on gl-mt6000 but borked my setup. I can no longer login to the web interface even after downgrade, luci and ssh work fine with same password. Also borked my exit node for vpn clients. I use mullvad for vpn and have 4 clients that use the router as an exit node through tailscale. Traffic gets routed through the mullvad vpn and it uses adguard home on the router for dns which is forwarded from port 53 to 3053 via firewall rules. Now it leaks DNS results for tailscale clients whereas prior to the update it used routed DNS traffic through the VPN and did not leak servers. Now not only is it leaking it isn't using adguard home for DNS. Not sure what about your script changed stuff that should be unrelated but it does.

Since the script does not touch any configuration, it's unrelated to your issue. Might be an issue with Tailscale itself, if they changed behaviour.

So I guess there are other reasons for your issues right now. If the GL GUI does not work, you should check the nginx config.

Any idea? I have no idea why suddenly this would be the case. The only thing that changed with regard to the setup, other than tailscale package update is whatever your script did? Why would suddenly port 80 and 443 be bound? Any thoughts based on this? I presume the binding is why I suddenly can't access the gli web interface although it's odd luci advanced page works fine.

nginx: [alert] lua_code_cache is off; this will hurt performance in /etc/nginx/conf.d/gl.conf:6
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)
nginx: [emerg] bind() to [::]:443 failed (98: Address in use)
nginx: [emerg] still could not bind()

You should check by using netstat -ltpn

Here is result of netstat -ltpn

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 tailscaleip:54413     0.0.0.0:*               LISTEN      11661/tailscaled
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      6956/nginx.conf -g
tcp        0      0 tailscaleip:53        0.0.0.0:*               LISTEN      7488/dnsmasq
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      7488/dnsmasq
tcp        0      0 wanip:53          0.0.0.0:*               LISTEN      7488/dnsmasq
tcp        0      0 192.*.*.*rtrpriv:53          0.0.0.0:*               LISTEN      7488/dnsmasq
tcp        0      0 10.*.*.*mullvadpriv:53          0.0.0.0:*               LISTEN      7488/dnsmasq
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3105/dropbear
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      6956/nginx.conf -g
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      8712/smbd
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      8712/smbd
tcp        0      0 :::3053                 :::*                    LISTEN      9061/AdGuardHome
tcp        0      0 :::80                   :::*                    LISTEN      6956/nginx.conf -g
tcp        0      0 ::1:53                  :::*                    LISTEN      7488/dnsmasq
tcp        0      0 ipv6:53 :::*                    LISTEN      7488/dnsmasq
tcp        0      0 ipv6:53 :::*                    LISTEN      7488/dnsmasq
tcp        0      0 :::22                   :::*                    LISTEN      3105/dropbear
tcp        0      0 :::3000                 :::*                    LISTEN      9061/AdGuardHome
tcp        0      0 :::443                  :::*                    LISTEN      6956/nginx.conf -g
tcp        0      0 :::445                  :::*                    LISTEN      8712/smbd
tcp        0      0 :::139                  :::*                    LISTEN      8712/smbd

Looks fine so far, the ports are used by nginx as it should be. So I guess the nginx config is broken - but in that case you did something else than just updating tailscale. Maybe you run another script of mine?

You can restore the nginx base config by running those commands:

/etc/init.d/nginx stop
cp -rf /rom/etc/nginx /etc/nginx
/etc/init.d/nginx start

So I did the nginx restore but still same thing with the nginx and gl gui. Address already in use etc

Where does this message appear?
It seems like there is a multiple run of nginx then, which would be weird.