Unable to get wireguard to work. Wireguard works on client (with a non-vyos based wireguard server). Using vyos 1.3.
Client config:
[Interface]
Address = 10.10.1.26/24
SaveConfig = true
ListenPort = 36261
PrivateKey = <PRIVATE_KEY>
[Peer]
PublicKey = /i0eNKVzlJcwYBN5yFBtISU0kcMCmaClTFqINaHzmVM=
AllowedIPs = 10.11.0.17/32
Endpoint = <VYOS_IP>:51820
Client:
interface: wg0
public key: fCJ6BSlJ2fwZgMknnRiOKR4JYiPpyza7JkddppdLCXQ=
private key: (hidden)
listening port: 36261
peer: /i0eNKVzlJcwYBN5yFBtISU0kcMCmaClTFqINaHzmVM=
endpoint: <VYOS_IP>:51820
allowed ips: 10.11.0.17/32, 192.168.17.0/24
transfer: 10.26 KiB received, 12.16 KiB sent
Vyos wireguard config:
Wireguard
set interfaces wireguard wg0 address ‘10.11.0.17/24’
set interfaces wireguard wg0 description ‘VPN-to-monitor’
set interfaces wireguard wg0 peer to-monitor allowed-ips ‘10.10.1.26/32’
set interfaces wireguard wg0 peer to-monitor address ‘<MONITOR_IP>’
set interfaces wireguard wg0 peer to-monitor port ‘36261’
set interfaces wireguard wg0 peer to-monitor pubkey ‘fCJ6BSlJ2fwZgMknnRiOKR4JYiPpyza7JkddppdLCXQ=’
set interfaces wireguard wg0 port ‘51820’
set protocols static interface-route 10.10.1.26/32 next-hop-interface wg0
set interfaces wireguard wg0 private-key KP01
vyos@vyos# show interfaces wireguard
wireguard wg0 {
address 10.11.0.17/24
description VPN-to-monitor
peer to-monitor {
address <MONITOR_IP>
allowed-ips 10.10.1.26/32
port 36261
pubkey fCJ6BSlJ2fwZgMknnRiOKR4JYiPpyza7JkddppdLCXQ=
}
port 51820
private-key KP01
}
From vyos:
vyos@vyos# ping 10.10.1.26
PING 10.10.1.26 (10.10.1.26) 56(84) bytes of data.
^C
— 10.10.1.26 ping statistics —
10 packets transmitted, 0 received, 100% packet loss, time 184ms
From client (aka, monitor)
ping 10.11.0.17
PING 10.11.0.17 (10.11.0.17) 56(84) bytes of data.
^C
— 10.11.0.17 ping statistics —
3 packets transmitted, 0 received, 100% packet loss, time 2031ms