Omdat Ubiquiti helaas geen andere VPN support gaat toevoegen aan hun USG3 én Android 12 geen L2TP VPN meer ondersteund, moet ik derhalve wat gaan verzinnen om nog te kunnen VPN-en vanaf mijn mobiel naar mijn USG.
Tijdens mijn zoektocht kwam ik uit op Wireguard op de USG te installeren via de CLI.
Prima, sounds simple enough. Maar helaas loop ik wat vast.
Wie ziet waar de crux zit?
Stappen tot nu toe doorlopen (gevonden via https://community.roonlab...ard-on-a-unifi-usg/124477)
Heb voor 0.0.0.0/0 gekozen omdat mijn mobiel geen fixed IP heeft.
Wanneer ik nu een commit doe, krijg ik de volgende foutmelding:
De volgende routes zie ik terug in mijn USG:
(waarbij 001.002.003.x) mijn public IP is.(VLANID# is een getal).
Nog niks op de mobiel gedaan, eerst zal de config naar de USG moeten committen.
Later komt nog de .JSON file zodat het persistent wordt.
Maar zover ben ik dus nog niet.
Wie oh wie heeft een scherp oog voor me?
Tijdens mijn zoektocht kwam ik uit op Wireguard op de USG te installeren via de CLI.
Prima, sounds simple enough. Maar helaas loop ik wat vast.
Wie ziet waar de crux zit?
Stappen tot nu toe doorlopen (gevonden via https://community.roonlab...ard-on-a-unifi-usg/124477)
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| curl -OL https://github.com/WireGuard/wireguard-vyatta-ubnt/releases/download/1.0.20220627-1/ugw3-v1-v1.0.20220627-v1.0.20210914.deb sudo dpkg -i ugw3-v1-v1.0.20220627-v1.0.20210914.deb #create tunnel secrets cd /config/auth umask 077 wg genkey | tee /config/auth/wg.key | wg pubkey > wg.public # Set the USG into configuration Mode configure # We start, by creating a new Network space for our side of the VPN - subnet/IP outside of existing scope. set interfaces wireguard wg0 address 192.168.9.1/32 # Configure the Port Wireguard will be listening with set interfaces wireguard wg0 listen-port 51820 # Allow this interface to forward the traffic over our tunnel set interfaces wireguard wg0 route-allowed-ips true # Now, we need to tell the interface the address of the far side of the bridge # And also the password to allow us connect set interfaces wireguard wg0 private-key /config/auth/wg.key # Set up the allowed peers (ie. clients). set interfaces wireguard wg0 peer <wg.public> allowed-ips 0.0.0.0/0 # Setting up the firewall rules set firewall name WAN_LOCAL rule 20 action accept set firewall name WAN_LOCAL rule 20 protocol udp set firewall name WAN_LOCAL rule 20 description 'WireGuard VPN' set firewall name WAN_LOCAL rule 20 destination port 51820 # Make the changes active, save them and exit configuration mode commit save exit |
Heb voor 0.0.0.0/0 gekozen omdat mijn mobiel geen fixed IP heeft.
Wanneer ik nu een commit doe, krijg ik de volgende foutmelding:
code:
1
| Error: Allowed IP default on interface wg0 peer <wg.public> conflicts with an existing route. route-allowed-ips cannot be enabled. |
De volgende routes zie ik terug in mijn USG:
(waarbij 001.002.003.x) mijn public IP is.(VLANID# is een getal).
code:
1
2
3
4
5
6
7
8
| root@USG# route -v Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 1-003-002-001.ft 0.0.0.0 UG 0 0 0 eth0.VLANID# 10.0.10.0 * 255.255.255.0 U 0 0 0 eth2 loopback * 255.0.0.0 U 0 0 0 lo 001.002.003.0 * 255.255.240.0 U 0 0 0 eth0.VLANID# 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 |
Nog niks op de mobiel gedaan, eerst zal de config naar de USG moeten committen.
Later komt nog de .JSON file zodat het persistent wordt.
Maar zover ben ik dus nog niet.
Wie oh wie heeft een scherp oog voor me?