Hi Team,
Could anyone please help me with the below scenario?
I have an OpenWRT device with wireguard-tools installed.I have a couple of WANs running on my device with mwan3 support.
I have established two wireguard(wg1 & wg2) connections with one OpenWRT VM running in AWS with a public subnet.
The thing is I need to route wg1 traffic via 1 WAN and wg2 traffic via the other WAN in my device.
How can I achieve this case?
I have also tried to achieve this above scenario using vpn-policy-routing
But it doesn't work's fine.
@AndrewZ
Thanks for your reply!!!
Yes, that's possible,
But consider our topology is something like this.
If I add route means, it will be like
ip route add 34.215.109.116 dev eth1 metric 10
ip route add 34.215.109.116 dev eth2 metric 11
With different metric only it is possible to add route for same destination IP.
even If I add like this the first route is via eth1.So all my wiregaurd traffic will go through eth1 only.
am I ryt?
Right, in this case it will be a failover between the two links.
I cannot experiment right now, so I'm just thinking loudly. What if you set the different fixed source ports for the clients and use that port as a criteria in the firewall rule?
But All the Wireguard traffic will be sent as UDP traffic ryt?
So I decided to make it as udp as protocol.
If you see in the tcpdump packet capture, the wireguard packets would be udp.