rh4gli
1
Hello,
I’m trying following configuration in Wireguard:
Setup:
Site S
Internet <-> ISP NAT Router (192.168.2.1/24) <-> GL-750S (Wireguard Server 10.0.0.1) (192.168.8.1/24) <-WiFi Client (192.168.8.10/32)
Site C
Internet <-> ISP NAT Router (192.168.1.1/24) <-> GL-750S (Wireguard Client 10.0.0.2) (192.168.6.1/24)
Desired Traffic flow:
Site-S WiFi Client → WG Tunnel → Site-C WG Client → Site-C-Internet
Source IP (or Subnet) based traffic routing is fine too.
I was wondering how to achieve this. Any help greatly appreciated.
You need to label the IP and subnet of each device so that I can provide you with some routing rules.
rh4gli
3
I edited the post with IP and Subnet. Thanks so much for the help
You can try adding rules to site s
ip route add 192.168.6.0/24 via 10.0.0.2 dev wg0
iptables -I FORWARD -j ACCEPT
rh4gli
5
Hello
This did not work.
from the Site-S connected client, here is the traceroute:
i@iMac27 ~ % traceroute www.google.com
traceroute to www.google.com (142.250.72.132), 64 hops max, 52 byte packets
1 console.gl-inet.com (192.168.8.1) 1.566 ms * 1.572 ms
2 192.168.2.1 (192.168.2.1) 1.697 ms 2.131 ms 1.695 ms
the traffic is not going over Site-C-Internet
Do you want all traffic to go through CLIENT WAN? Try the following rules
on site s
ip route add 128.0.0.0/1 via 10.0.0.2 dev wg0
ip route add 0.0.0.0/1 via 10.0.0.2 dev wg0
iptables -I FORWARD -j ACCEPT
on site c
iptables -I FORWARD -j ACCEPT
I’m not sure if this will work properly, just some suggestions