Dear all,
I know this is an openHAB forum and my question is not about openHAB, and that is why I post below question in the off-topic section. However, I know the kindness of this forum and the many computer / network enthusiasts here, so it’s worth a try.
Ok, the situation:
I bought a Unifi USG 3 router and some Unifi AP. I need to run a Wireguard client from the USG to a Wireguard server outside to route all my internet traffic. Currently I have this running from an OpenWRT router and it works flawlessly.
I managed to get the Wireguard tunnel up and running on the USG, with a constant handshake and connection. However, I cannot route all traffic over the wg0 interface. This has more to do with my lack of routing / firewall knowledge than anything else.
Here is my current routing:
root@ubnt:/home/admin# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 100.xxx.xxx.xxx 0.0.0.0 UG 0 0 0 eth0
10.99.xxx.xxx 0.0.0.0 255.255.255.255 UH 0 0 0 wg0
100.xxx.xxx.xxx 0.0.0.0 255.255.255.224 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
192.168.5.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
Wireguard client configuration:
root@ubnt:/home/admin# wg show
interface: wg0
public key: <public key>
private key: (hidden)
listening port: 33391
peer: <peer key>
endpoint: 185.xxx.xxx.xxx:51820
allowed ips: 0.0.0.0/0
latest handshake: 1 minute, 21 seconds ago
transfer: 55.25 KiB received, 206.45 KiB sent
persistent keepalive: every 25 seconds
Any hints and pointers how to route all traffic over one interface (wg0)?
I also posted on the Ubiquiti forum, but it is not very active or helpful so far.