Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clients connect and have access to network but not to internet with ALL the traffic through the tunnel #38

Open
Dark-Schneider-666 opened this issue Nov 23, 2024 · 0 comments

Comments

@Dark-Schneider-666
Copy link

Dark-Schneider-666 commented Nov 23, 2024

I am using the sample config, on server (wg0.conf):

## server configuration (wg0.conf)

[Interface]
Address = 10.13.13.1/24
ListenPort = 51820
PrivateKey = some
## uncomment next two lines if you also want to gain access to your entire lan or if you
## want all traffic to go through the tunnel
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = othersome
AllowedIPs = 10.13.13.2/32

Client is config with the Wireguard application (iPhone), from scratch setting all the parameters. It connects and have access to my LAN (router, NAS, etc.) but has no internet access. The allowed IPs set in the client are 0.0.0.0/0 so it should allow any connection.
One interesting thing is that setting on the client allowed IPs to the VPN (10.13.13.0/24) plus the LAN one (192.168.../24) it works nicely as uses the VPN only for those networks, and internet from its own one (so internet works by this way).
But IMHO it would be interesting to have all the traffic over the VPN as I have a pi-hole configured on the network and would like to set the DNS of the VPN for using it.

The server has internet access with correct DNS, I can ping google.com and works.

I am using it on a Qnap NAS, it doesn't allow kernel implementation so it is using the userspace one.

Thanks.

@Dark-Schneider-666 Dark-Schneider-666 changed the title Clients connect and have access to network but not to internet Clients connect and have access to network but not to internet with ALL the traffic through the tunnel Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant