Wireguard with VPN Provider: failed

Hi,

I am trying to build a VPN gateway for my LAN, based on wireguard: so, after vyos installation (1.3 rolling, I followed readthedocs), I tried to configure wireguard (client) on my router (for my VPN provider, at this moment is Mullvad) with no success (when wireguard interface goes up, no ping, no internet).

I think I missing something (maybe firewall or nat configuration) but I am new on vyos and I am in trouble: can you share an howto connect to a generic VPN provider with wireguard protocol?

Thanks in advance

You need a static interface route for 0.0.0.0/0 pointing at your wireguard interface.

I set:

protocols {
static {
interface-route 0.0.0.0/0 {
next-hop-interface wg01 {
}
}
}
}

and

wireguard wg01 {
address my_ip_from_mullvad/32
peer mullvad_peername {
allowed-ips 0.0.0.0/0
endpoint mullvad_server_endpoint_address:51820
persistent-keepalive 25
pubkey mullvad_server_public_key
}
port 51820
private-key my_private_key
}

but doesn’t works.

How can I investigate my problem with wireguard?

Thanks in advance

Are you sure that the wireguard connection is established correctly?
For client VPN connection you do not need to configure nat and firewalls (for vyos-host of course).
IMHO static route 0.0.0.0/0 should only be set after wireguard cnnection goes up.
Due to the fact that the wireguard does not have a separate setting for the default route, such as OpenVPN, for example, it is logical to expect that the default route should appear automatically after the wireguard connection is established.
I think you need to remove the static route to the interface wg01 from the configuration and also do not need to specify a port in wireguard client interface wg01 configuration.

Start wireguard connection and show:

$ sh ip ro

$ sh int wireguard wg01