Skip to content

Commit d4e2547

Browse files
authored
Merge pull request #15 from peak-load/patch-1
Update wireguard.md
2 parents bb394d2 + b68672f commit d4e2547

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

configuration/wireguard.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,33 @@ RPi4:~ # systemctl start wireguard.service
160160

161161
Check the WireGuard tunnel is active using "ifconfig" and "ping" and if all is good, reboot to test the WireGuard tunnel comes up automatically on boot.
162162

163+
## Known issues
164+
Connman makes wg0 route for all traffic by default, no matter what `WireGuard.AllowedIPs` you will set.
165+
166+
To workaround this problem if you really need route only specific networks via wireguard tunnel (e.g. to watch IPTV from abroad), you can use tips and systemd config example from this forum tread https://forum.libreelec.tv/thread/21906-wireguard-changes-the-default-route-although-not-configured/
167+
168+
Note `sleep` `connmanctl move-after` and `route add` commands added to config.
169+
170+
```
171+
[Unit]
172+
Description=WireGuard VPN Service
173+
After=network-online.target nss-lookup.target connman.service connman-vpn.service bluetooth.service
174+
Wants=network-online.target nss-lookup.target connman.service connman-vpn.service bluetooth.service
175+
176+
[Service]
177+
Type=oneshot
178+
RemainAfterExit=yes
179+
ExecStart=/bin/sleep 5
180+
ExecStart=/usr/bin/connmanctl connect vpn_X_klaus
181+
ExecStart=/usr/bin/connmanctl move-after vpn_X_klaus ethernet_b827eb10c45a_cable
182+
ExecStart=/usr/bin/connmanctl move-after vpn_X_klaus ethernet_b827eb10c45a_cable
183+
ExecStart=/usr/sbin/route add -net 192.168.2.0 netmask 255.255.255.0 gw 10.0.0.2
184+
ExecStop=/usr/bin/connmanctl disconnect vpn_X_klaus
185+
186+
[Install]
187+
WantedBy=multi-user.target
188+
```
189+
163190
## Thanks
164191

165192
Big thanks! to ConnMan maintainer Daniel Wagner \(wagi\) who worked with LibreELEC staff to implement WireGuard support in ConnMan \(he wrote the code, we ~~abused~~ tested it\).

0 commit comments

Comments
 (0)