donaldzou / WGDashboard

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

Logging out occurs when trying to activate some of the peers. #482

Open NavidYosufie opened 1 week ago

NavidYosufie commented 1 week ago

Some of the peers become inactive, and when I try to reactivate them, I get logged out, and they don’t activate.

https://github.com/user-attachments/assets/7a0ab945-dda2-47cb-b0b2-b9c2dd9897f1

donaldzou commented 1 week ago

Hi @NavidYosufie, do you mind running it in debug mode and see what it output?

./wgd.sh stop
./wgd.sh debug

and re-do what you did in the video :)

DaanSelen commented 1 week ago

Related: https://github.com/donaldzou/WGDashboard/issues/377

donaldzou commented 1 week ago

Related: #377

hmmmmm maybe is not because of that

NavidYosufie commented 1 week ago

hi @donaldzou I activated the debug mode and sent you the screenshot of the log

Screenshot 2024-11-13 174859

donaldzou commented 1 week ago

I see.. in your UI, do you see a non restricted peer with the same public key as the restricted one?

NavidYosufie commented 6 days ago

It was fixed Just one more thing, I set up a panel on the Hetzner data center and the server is continuously abused due to network scanning, but I did not do this, everything is related to the panel. Screenshot 2024-11-15 110741

donaldzou commented 6 days ago

Ummm in this case I'm not sure.. as is not related to WGDashboard.

IIRC, i don't think there's a good way to prevent port scanning. If you want to prevent access other than you to can set up firewall rules to only allow your IP to access.

NavidYosufie commented 6 days ago

Ummm in this case I'm not sure.. as is not related to WGDashboard.

IIRC, i don't think there's a good way to prevent port scanning. If you want to prevent access other than you to can set up firewall rules to only allow your IP to access.

Can you tell me how I can set the rules, I don't have deep expertise in Linux

DaanSelen commented 6 days ago

Ummm in this case I'm not sure.. as is not related to WGDashboard. IIRC, i don't think there's a good way to prevent port scanning. If you want to prevent access other than you to can set up firewall rules to only allow your IP to access.

Can you tell me how I can set the rules, I don't have deep expertise in Linux

Depending on the firewall application. If you use ufw then I can advise this:

sudo apt install ufw

# Allow SSH connections to prevent lockout
sudo ufw allow 22/tcp 
sudo ufw allow 10086/tcp
sudo ufw allow 51820/udp

sudo ufw enable

If you have questions, ask them before applying these rules. Because fault configuration can cause you to be locked out.