Simple script that makes it easier to use Mullvad's VPN with WireGuard and OpenRC on Gentoo.
This is a fork of phvr script that replaces sudo with OpenDoas to not have to re-enter your password when connecting to the server use the persist feature in OpenDoas.
- Mullvad Account
- Gentoo Linux
- A kernel able to run WireGuard
Add elliowo-overlay to portage, sync and run.
# emerge -a mullvad-wg-doas
To pull in all available servers and their wireguard configs, do
mullvad update servers
This will prompt you for your Mullvad account number. Do this after installation.
To connect to a server, simply write
mullvad connect <server>
It it also possible to leave out server selection and connect to default
mullvad connect
Note that this needs to be set with mullvad update default
, before using the above command.
mullvad disconnect
mullvad update default
This command will let you set a default server of your choosing. Use the list
command to view the current default.
Enable a kill-switch
mullvad kill-switch on <server>
Disable a kill-switch
mullvad kill-switch off <server>
It is possible to choose multiple servers. To enable a kill-switch for all servers run
mullvad kill-switch <on|off> all
When you first update the server list you will shown the current available servers. To view the list again type
mullvad list
To get more detailed information about your connection, run
mullvad status
or
mullvad verify
to verify using the am.i.mullvad.net API
It is possible to choose a server that will auto connect on boot.
mullvad start-up <on|off> <server>
Show the currently selected startup server:
mullvad start-up show
For this to work you need the 'local' service enabled:
# rc-update add local default
The help section can be accessed with
mullvad help
- phvr script - Script this is based on.
- Running WireGuard with Mullvad on Linux - Mullvad's official guide.
- WireGuard - Official WireGuard website.
- OpenDoas - OpenDoas GitHub.
Adi Hrustic wrote this script - phvr forked it to adapt it to OpenRC and package it for Gentoo
This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details.