donaldzou / WGDashboard

Simple dashboard for WireGuard VPN written in Python & Vue.js
https://donaldzou.github.io/WGDashboard-Documentation/
Apache License 2.0
1.62k stars 241 forks source link

change ip address to ipv6 on reboot #296

Closed Johnnykson closed 3 months ago

Johnnykson commented 3 months ago

Hi! Today I installed the latest version and found that sometimes when the system starts the IP address changes to something similar to IPv6 Снимок экрана 2024-08-11 041822

There are no errors during normal startup, but during debugging it shows the following: Снимок экрана 2024-08-11 041905

These messages appear in the logs with the frequency with which the update interval is set in the web panel, I don’t know if this was intended or not. Снимок экрана 2024-08-11 041951

donaldzou commented 3 months ago

Ah yes, that issue is not a fatal errors. Python 3.12 somehow also do a syntax check on regular expressions and it keep showing although I couldn't locate the issue on other regex parser lol.

Regarding the IPv6.. do you have that setup in your server? It means somehow WireGuard changed your wg interface IP into a IPv6 and edited the .conf.. need to look into that.

donaldzou commented 3 months ago

One way to test this is turn off the interface, manually edit /etc/wireguard/wg1.conf and change the IP back to the IPv4 you had, and turn it back on withwg-quick up wg1. See if that still happen?

Johnnykson commented 3 months ago

Regarding the IPv6.. do you have that setup in your server? It means somehow WireGuard changed your wg interface IP into a IPv6 and edited the .conf.. need to look into that.

Yes, indeed, this is WireGuard playing around Снимок экрана 2024-08-11 044812

donaldzou commented 3 months ago

Maybe checking the service file? Usually the commands are in the line of ExecStart=....

Johnnykson commented 3 months ago

Maybe checking the service file? Usually the commands are in the line of ExecStart=....

the script for installing WireGuard that I use creates a configuration file in /root/vg-conf, I deleted it and cleaned the added IP in /etc/wireguard/wg1.conf and now everything is fine Снимок экрана 2024-08-11 045800 It's strange that WG didn't do this before and I didn't have to clean its configuration files.

donaldzou commented 3 months ago

Huh never heard of that before lol. U can close this comment if everything is working now ;)