Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux_router:wireguard [2021-01-03 Sun wk53 17:11] – [Full NFTables Code] baumkp | linux_router:wireguard [2025-05-24 Sat wk21 21:09] (current) – baumkp | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
- | =====Wireguard VPN====== | + | =====Wireguard VPN access from WAN to LAN====== |
+ | <fc # | ||
+ | I use 2 forms of vpn (virtual private network) on my home server. | ||
+ | - VPN to gain remote secure private access to my home LAN from the WAN (internet). //This is the one I am describing here.// | ||
+ | - VPN to anonymize my public internet access, making it more difficult for others to track my online behavior. | ||
WireGuard is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under heavy development, | WireGuard is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under heavy development, | ||
Line 27: | Line 31: | ||
===Greatest Difficulties in Setting=== | ===Greatest Difficulties in Setting=== | ||
- | Wireguard is not a chatty. | + | Wireguard is not chatty, this actually is a security feature. It is important that the setup information is done correctly, in particular the private and public keys. Also the allowed ips is important. On the server side it is set to the main VPN ip address. On the client side it needs to be set to include ip addresses that are allowed to be access on the client side. |
Some tools that help fault find: | Some tools that help fault find: | ||
* On the server side: '' | * On the server side: '' | ||
Line 386: | Line 390: | ||
- '' | - '' | ||
- '' | - '' | ||
+ | - '' | ||
I used my iPhone Wireguard app as the other end. It is important that the app is correctly configured. | I used my iPhone Wireguard app as the other end. It is important that the app is correctly configured. | ||
The iOS app seems to send 20 keep alive packets waiting 5 seconds for a response after which it stops the keep alive attempts. | The iOS app seems to send 20 keep alive packets waiting 5 seconds for a response after which it stops the keep alive attempts. | ||
+ | |||
+ | '' | ||
+ | < | ||
+ | link/ | ||
+ | inet 192.168.6.1/ | ||
+ | | ||
+ | |||
+ | For some reason my system would not link the IP address even though the wg script was clearly running the commands, '' | ||
+ | < | ||
+ | Jul 03 21:25:44 Router wg-quick[3483]: | ||
+ | Jul 03 21:25:44 Router wg-quick[3483]: | ||
+ | Jul 03 21:25:44 Router wg-quick[3483]: | ||
+ | Jul 03 21:25:44 Router wg-quick[3483]: | ||
+ | Jul 03 21:25:44 Router wg-quick[3483]: | ||
+ | Jul 03 21:25:44 Router wg-quick[3483]: | ||
+ | Jul 03 21:25:44 Router systemd[1]: Started WireGuard via wg-quick(8) for wg0.</ | ||
+ | then\\ | ||
+ | '' | ||
+ | link/ | ||
+ | </ | ||
+ | |||
+ | After updating to Debian 11 the following quick fix caused an error so I simply removed and rebooted. '' | ||
+ | Address = 192.168.6.1/ | ||
+ | SaveConfig = true | ||
+ | ListenPort = 51914 | ||
+ | PrivateKey = censored= | ||
+ | |||
+ | [Peer] | ||
+ | PublicKey = censored= | ||
+ | AllowedIPs = 192.168.6.2/ | ||
+ | Endpoint = 1.127.16.49: | ||
+ | |||
+ | [Peer] | ||
+ | PublicKey = censored= | ||
+ | AllowedIPs = 192.168.6.3/ | ||
+ | Endpoint = 192.168.1.34: | ||
+ | </ | ||
+ | |||
+ | |||
---- | ---- | ||
Line 454: | Line 498: | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
+ | *[[https:// | ||
- | <- linux_router: | + | <- linux_router: |