donaldzou / WGDashboard

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

no received any packet after connecting #319

Closed hadi-dindar closed 2 months ago

hadi-dindar commented 2 months ago

after crating wg0 interface in ui new pannel when i build a peer and connect it my received packets are 9B only . not work fine

malikshi commented 2 months ago

Did you set firewall? Setup pushup and pushdown.

hadi-dindar commented 2 months ago

Did you set firewall? Setup pushup and pushdown.

no , how i should be add pust up and down in new version ?

rhenigma commented 2 months ago

Did you set firewall? Setup pushup and pushdown.

It's PostUp and PostDown config lines inside *.conf files

Did you set firewall? Setup pushup and pushdown.

no , how i should be add pust up and down in new version ?

As far as i know during my testing, it's not accessible via web-ui, you need to do edit it via CLI preferrably using pico/nano/vi/vim for PostUp and PostDown config lines.

See here for more info

hadi-dindar commented 2 months ago

Did you set firewall? Setup pushup and pushdown.

It's PostUp and PostDown config lines inside *.conf files

Did you set firewall? Setup pushup and pushdown.

no , how i should be add pust up and down in new version ?

As far as i know during my testing, it's not accessible via web-ui, you need to do edit it via CLI preferrably using pico/nano/vi/vim for PostUp and PostDown config lines.

See here for more info

Please share with me command of postup and down Tnx

rhenigma commented 2 months ago

Did you set firewall? Setup pushup and pushdown.

It's PostUp and PostDown config lines inside *.conf files

Did you set firewall? Setup pushup and pushdown.

no , how i should be add pust up and down in new version ?

As far as i know during my testing, it's not accessible via web-ui, you need to do edit it via CLI preferrably using pico/nano/vi/vim for PostUp and PostDown config lines. See here for more info

Please share with me command of postup and down Tnx

Here you go https://www.cyberciti.biz/faq/how-to-set-up-wireguard-firewall-rules-in-linux/ . RTFM is required though, good luck!

P/S: Btw i don't consider this as bug since it may as well false positive or misconfiguration instead.

MoeinNS commented 2 months ago

after crating wg0 interface in ui new pannel when i build a peer and connect it my received packets are 9B only . not work fine

Did your problem solve?!

DaanSelen commented 2 months ago

@hadi-dindar please share your WireGuard configuration. As an example:

[Interface]
SaveConfig = true
Address = 10.0.0.1/24
PrivateKey = yBsUJvKtKfv3PwcOzijsvLYnD1WGYWZ8EB7wQldE/W4=
PostUp = iptables -t nat -I POSTROUTING 1 -s 10.0.0.1/24 -o eth0 -j MASQUERADE
PostUp = iptables -I FORWARD -i wg0 -o wg0 -j DROP
PreDown = iptables -t nat -D POSTROUTING -s 10.0.0.1/24 -o eth0 -j MASQUERADE
PreDown = iptables -D FORWARD -i wg0 -o wg0 -j DROP
ListenPort = 51820

The PreUp and PostDown lines enable the software-firewall to function as a "forwarder".

hadi-dindar commented 2 months ago

https://www.cyberciti.biz/faq/how-to-set-up-wireguard-firewall-rules-in-linux

tnx . solved

hadi-dindar commented 2 months ago

@hadi-dindar please share your WireGuard configuration. As an example:

[Interface]
SaveConfig = true
Address = 10.0.0.1/24
PrivateKey = yBsUJvKtKfv3PwcOzijsvLYnD1WGYWZ8EB7wQldE/W4=
PostUp = iptables -t nat -I POSTROUTING 1 -s 10.0.0.1/24 -o eth0 -j MASQUERADE
PostUp = iptables -I FORWARD -i wg0 -o wg0 -j DROP
PreDown = iptables -t nat -D POSTROUTING -s 10.0.0.1/24 -o eth0 -j MASQUERADE
PreDown = iptables -D FORWARD -i wg0 -o wg0 -j DROP
ListenPort = 51820

The PreUp and PostDown lines enable the software-firewall to function as a "forwarder".

thank you Bro

DaanSelen commented 2 months ago

Hey @hadi-dindar if it helped, you can mark the issue as solved :) at the bottom of this page.

MoeinNS commented 1 month ago

https://www.cyberciti.biz/faq/how-to-set-up-wireguard-firewall-rules-in-linux

tnx . solved

I have the same problem. How did you solve it?!

DaanSelen commented 1 month ago

https://www.cyberciti.biz/faq/how-to-set-up-wireguard-firewall-rules-in-linux

tnx . solved

I have the same problem. How did you solve it?!

By setting the proper iptables masquerading rules with ther postup, and predown lines. See my example config above.