User Tools

Site Tools


network:vpn:wireguard_access_to_home_network_using_pikvm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
network:vpn:wireguard_access_to_home_network_using_pikvm [2023/05/14 21:55] – created adminnetwork:vpn:wireguard_access_to_home_network_using_pikvm [2024/11/17 13:30] (current) admin
Line 55: Line 55:
  
 [WireGuardPeer] [WireGuardPeer]
-PublicKey=... +PublicKey=<generated on the client and pasted here or generated as a key pair like the one for peer A> 
-PresharedKey=...+PresharedKey=<peer_A-peer_B.psk>
 AllowedIPs=10.0.0.2/32 AllowedIPs=10.0.0.2/32
  
Line 69: Line 69:
 AllowedIPs=10.0.0.4/32 AllowedIPs=10.0.0.4/32
 ``` ```
 +
 +After adding peers use `systemctl restart systemd-networkd` to load the new configuration.
  
 `/etc/systemd/network/99-wg0.network`: `/etc/systemd/network/99-wg0.network`:
Line 80: Line 82:
 ``` ```
  
 +## A typical client conf file (peer_B and so on)
  
 +E. g. for peer B:
 +
 +```ini
 +[Interface]
 +Address = 10.0.0.2/24
 +DNS = 192.168.1.1
 +ListenPort = 38865
 +MTU = 1330
 +PrivateKey = <best generated on the client>
 +[Peer]
 +PublicKey = <contents of peer_A.pub>
 +PresharedKey = <contents of peer_A-peer_B.psk>
 +AllowedIps = 10.0.0.0/24,<in home private IPv4 network: e.g 192.168.x.0/24>,<more in home networks if needed> 
 +Endpoint = <DNS resolveable hostname of public IP>:38865(51820)
 +```
 +
 +With the information filled in the conf file can be transferred to the client. For IOs and Android QR codes can be used:
 +
 +```bash
 +qr < peer_B.conf
 +```
network/vpn/wireguard_access_to_home_network_using_pikvm.1684094112.txt.gz · Last modified: by admin