This is a reminder for me on how to use MozWire (Mozilla VPN on Linux)
First, make sure you have mozwire
installed. You can use your normal package manager, I use nix
here
$ nix shell nixpkgs\#mozwire
Then log in to Mozilla VPN, via
$ export MOZ_TOKEN=$(mozwire --print-token)
Note, you probably want to do this in a shell session you quit after relay save
below
Note, ake sure you have enabled JavaScript on the mozilla webpage, otherwise logging in might not send the token back to the shell.
Create a connection, you can use
$ mozwire relay save gb
And then import that connection -- note you might lose internet after this step (and it means you need to do the ip route
step).
$ nmcli connection import type wireguard file <file from previous step>
I then lose internet here, because nmcli hasn't added an IP route to the peer to go outside the VPN...
The file from the previous step has the [Peer]
section, which has Endpoint = <ip>:<port>
And 192.168.0.1 dev enp34s0
is my non-VPN traffic, you can just run ip route
to find that out
Now let's add a specific route for the peer
$ sudo ip route add <ip> via 192.168.0.1 dev enp34s0