This is an automated archive.
The original was posted on /r/wireguard by /u/gurkalurka on 2024-01-03 04:20:02+00:00.
If I set
AllowedIPs = 0.0.0.0/0
I get a ping/ssh etc. All routes fine.
If I restrict AllowedIPs with 10.10.0.0/32 I get nothing on the routing.
Here is my wg0 conf:
[Interface]
Address = 10.10.0.1/24
#SaveConfig = true
PostUp = ip rule add table 200 from
PostUp = ip route add table 200 default via
PreDown = ip rule delete table 200 from
PreDown = ip route delete table 200 default via
PostDown = iptables -D INPUT -p udp --dport 51820 -j ACCEPT; iptables -t nat -D POSTROUTING -s 10.10.0.0/24 -o primary -j MASQUERADE
ListenPort = 51820
PrivateKey = xxx
DNS = 8.8.8.8 1.1.1.1
#peer 1
[Peer]
PublicKey = yyy
PresharedKey = zzz
AllowedIPs = 10.10.0.2/32
Peer 1 config:
[Interface]
PrivateKey = xxx
ListenPort = 51820
Address = 10.10.0.2/32
DNS = 1.1.1.1, 1.0.0.1
MTU = 1412
[Peer]
PublicKey = yyy
PresharedKey = zzz
AllowedIPs = 0.0.0.0/0
Endpoint = :51820
PersistentKeepalive = 25
Everything works fine only if using 0.0.0.0/0 as the allowed IPs setting. I would like to restrict it to 10.10.0.0/32 so I only route IPs that exist on this network through the tunnel, and everything else should use my normal route without the tunnel. I had this working before, but now not sure what's causing this.
Thanks