WireGuard Lan access does not work on Linux but on Mobile phone
0
votes
1
answer
3277
views
I'm trying to connect my Laptop (which is running fedora or manjaro) to connect all the time to my raspberry Pi with PiVPN.
I have set up the IP tables and also port forwarding.
I can access my Pi under 10.6.0.1 but not my normal subnet 192.168.0.0/24. On my mobile phone I can access my Local Lan from other networks, but not from my laptop.
I've generated the wg0.conf wireguard file from PiVPN and put it under /etc/wireguard. And it is working. But I can't access the Lan. It should route all traffic through the Pi.
I've tried adding more to the Allowed IPs but this did'nt helped either. I also added IP Tables in the conf file. Is it a problem with the OS or Wireguard?
I also can ping 10.6.0.1 (PI) from another network while being connected over WireGuard, but when I try to ping 196.168.178.35 (LAN PI) it says couldn't reach host.
Conf files:
Pi Server:
[Interface]
PrivateKey =
Address = 10.6.0.1/24
MTU = 1420
ListenPort =
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey =
PresharedKey =
AllowedIPs = 10.6.0.4/32
Client:
[Interface]
PrivateKey =
Address = 10.6.0.4/24
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
DNS = 10.6.0.1
[Peer]
PublicKey =
PresharedKey =
Endpoint = :
AllowedIPs = 0.0.0.0/0
PersistentKeepalive=30
Asked by iawegfib
(1 rep)
Jun 11, 2022, 07:47 PM
Last activity: Jul 25, 2025, 03:03 AM
Last activity: Jul 25, 2025, 03:03 AM