This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!
ProtonVPN¶
Reference(s)
Table of contents¶
Install¶
A correct kernel config is needed:
$ cd /usr/src/linux
# make nconfig # or `# make menuconfig`
# Double check here:
# <https://wiki.gentoo.org/wiki/OpenVPN#Kernel>
> Device Drivers --->
> [*] Network device support ---> # Symbol: NETDEVICES [=y]
> [*] Network core driver support # Symbol: NET_CORE [=y]
> <*> Universal TUN/TAP device driver support # Symbol: TUN [=y]
Warning
After configuring the kernel don't forget to do a kernel make and rebuild!
Initialize protonvpn-cli
:
During the initialization step, when being asked the username and the password, use your ProtonVPN - OpenVPN credentials (not your account username and password). I.e. go to ProtonVPN website -> login -> account -> OpenVPN / IKEv2.
Config¶
Change protonvpn-cli
configuration if needed:
Use¶
-
Get status:
-
Connect to a random server:
-
Connect to the fastest server:
-
Connect to the fastest P2P server:
-
Connect to the fastest server in a specified country:
-
Connect to the fastest "secure core" server:
-
Reconnect to the last server used:
-
Disconnect the current session:
-
Refresh OpenVPN configuration and server data:
-
Print example commands:
-
Display version:
-
Show help message:
OpenVPN¶
Reference(s)
ProtonVPN can entirely be used through OpenVPN.
- Install prerequisite (
resolvconf
):
-
Create a dedicated config directory:
-
Download the desired configuration files:
- Go to the ProtonVPN website
- Login
- Downloads
- OpenVPN configuration files
-
- Select platform:
GNU/Linux
- Select platform:
-
- Select protocol:
UDP
(recommended) orTCP
if you experience slow VPN speeds
- Select protocol:
-
- Select config file and download:
Standard server configs
- Select config file and download:
- Download all configurations in
$HOME/.config/openvpn/protonvpn-server-configs
-
Get your credentials:
- Go to the ProtonVPN website
- Login
- Account
- OpenVPN / IKEv2
-
Install the ProtonVPN
update-resolv-conf
script: -
Put you ProtonVPN credentials into a pass file:
-
Append the path to the pass file to all your downloaded
.ovpn
files: -
Now you can connect to a ProtonVPN server like so (e.g. on server
fr-36
):
Tips¶
Run the VPN per application¶
See vpnify
.
Configure the VPN to accept traffic from public IP and respond on the same channel¶
TODO: /opt/update-duckdnsip
When a VPN is set up on a server, how to access it via SSH ? Or how to still let the server be available e.g. with Nginx ? I.e. how to accept traffic from public IP and respond on the same channel, not with the VPN channel ?
Find the interface name you are using to connect to the internet:
E.g.wlp2s0
is my interface.
Find your inet
(/inet4
) on your interface:
inet
is 192.168.1.42/24
. 192.168.1.42
is the local address, 24 is the
netmask, and 192.168.1.0 is the subnet. (NOTE: you can configure your internet router to
get a fixed inet
)
Find your gateway:
The gateway is the address next to "default via ...". E.g. 192.168.1.1 is my gateway.Add a table rule:
Add routing rules:
# ip route add table 128 to [SUBNET]/[NETMASK] dev [INTERFACE]
# ip route add table 128 default via [GATEWAY]
NOTE: These rules will only last until the system shuts down. Consider reapplying them when the system reboots.
How to undo this ?¶
Show table:
Remove table:
If this cheat sheet has been useful to you, then please consider leaving a star here.