I use a ubuntu server to create a wireguard VPN on my system. Now i thinking that would be great, that i able to do the same With my vyos system. (network do network )
Here is my wireguard (ubuntu) config:
[Interface] Address = 192.168.32.1/16 SaveConfig = false PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens18 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o ens18 -j MASQUERADE ListenPort = 123 PrivateKey = *** [Peer] PublicKey = *** AllowedIPs = 192.168.32.0/24 Endpoint = *** [Peer] PublicKey = *** AllowedIPs = 192.168.33.0/24 Endpoint = *** [Peer] PublicKey = *** AllowedIPs = 192.168.34.0/24
my Ubuntu server IP address is 192.168.31.105 the Vyos IP address is 192.168.31.1
I able to create a Wireguard connection with vyos and i able to connect it, but i can not ping to the wg0 interface ip (like 192.168.33.1) with client and i can not ping client with wireguard.
What is the problem?
I use this config:
set interfaces wireguard wg0 address '192.168.33.1/32' set interfaces wireguard wg0 port '123' set interfaces wireguard wg0 peer CLIENT1 allowed-ips '192.168.33.0/24' set interfaces wireguard wg0 peer CLIENT1 persistent-keepalive 15 set interfaces wireguard wg0 peer CLIENT1 pubkey '<pubkey client1>' set protocols static interface-route '192.168.31.0/24' next-hop-interface wg0