# Proton VPN

#### VPN (host)

```bash
sudo apt install wireguard resolvconf -y
```

&gt; Download wireguard configuration on [https://account.protonvpn.com](https://account.protonvpn.com%5D(https//account.protonvpn.com) and move it to /etc/wireguard

```bash
sudo vim /etc/wireguard/wg0.conf
```

```conf
[Interface]
# Key for sandy
# Bouncing = 9
# NetShield = 1
# Moderate NAT = off
# NAT-PMP (Port Forwarding) = off
# VPN Accelerator = on
PrivateKey = ADq//ojZkfqe9XVtjzfiolEmbtXqU2AmlsZWGDTeqEk=
Address = 10.2.0.2/32
DNS = 10.2.0.1

[Peer]
# FR#167
PublicKey = zeGY3uQTDqTiaxp6vGqFzXck1TPNnzY+JZ2iNI2BrRU=
AllowedIPs = 0.0.0.0/0
Endpoint = 146.70.194.98:51820
```

```bash
sudo wg-quick up wg0.conf
```

#### enable

```bash
sudo systemctl enable --now wg-quick@wg0
```

#### Check...

```
sudo wg

curl https://ip.m
```

---

## OpenVPN

```
sudo apt install -y openvpn openresolv

sudo wget "https://raw.githubusercontent.com/ProtonVPN/scripts/master/update-resolv-conf.sh" -O "/etc/openvpn/update-resolv-conf"
```

Download configuration file : [https://account.protonvpn.com/downloads](https://account.protonvpn.com/downloads)

Enter username and password : [https://account.protonvpn.com/account](https://account.protonvpn.com/account)

```bash
sudo vim /etc/openvpn/fr.protonvpn.tcp.conf
```

```conf
# ==============================================================================
# Copyright (c) 2023 Proton AG (Switzerland)
# Email: contact@protonvpn.com
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# ==============================================================================

# If you are a paying user you can also enable the ProtonVPN ad blocker (NetShield) or Moderate NAT:
# Use: "u97gzcUx2gei2toi+f1" as username to enable anti-malware filtering
# Use: "u97gzcUx2gei2toi+f2" as username to additionally enable ad-blocking filtering
# Use: "u97gzcUx2gei2toi+nr" as username to enable Moderate NAT
# Note that you can combine the "+nr" suffix with other suffixes.

client
dev tun
proto tcp

remote 149.102.245.129 8443
remote 146.70.194.98 8443
remote 185.246.211.72 8443
remote 149.102.245.156 443
remote 146.70.194.34 7770
remote 146.70.194.34 8443
remote 146.70.194.114 7770
remote 149.102.245.129 443
remote 146.70.194.18 7770
remote 146.70.194.34 8443
remote 149.102.245.156 443
remote 149.102.245.156 8443
remote 146.70.194.66 8443
remote 146.70.194.82 8443
remote 146.70.194.18 443
remote 149.102.245.129 7770
remote 146.70.194.34 443
remote 146.70.194.34 7770
remote 146.70.194.98 443
remote 185.246.211.72 443
remote 146.70.194.2 8443
remote 149.102.245.156 7770
remote 146.70.194.98 8443
remote 149.102.245.129 7770
remote 146.70.194.34 7770
remote 149.102.245.156 7770
remote 149.102.245.129 443
remote 149.102.245.156 8443
remote 146.70.194.18 443
remote 149.102.245.129 8443
remote 146.70.194.98 443
remote 149.102.245.156 8443
remote 146.70.194.82 7770
remote 146.70.194.82 8443
remote 146.70.194.66 443
remote 149.102.245.129 7770
remote 146.70.194.98 7770
remote 149.102.245.156 443
remote 149.102.245.156 443
remote 146.70.194.34 443
remote 146.70.194.82 7770
remote 146.70.194.114 443
remote 146.70.194.34 443
remote 146.70.194.2 7770
remote 146.70.194.82 443
remote 146.70.194.98 7770
remote 146.70.194.82 443
remote 149.102.245.129 7770
remote 185.246.211.72 7770
remote 149.102.245.129 443
remote 146.70.194.18 7770
remote 149.102.245.129 443
remote 146.70.194.66 7770
remote 149.102.245.129 8443
remote 149.102.245.156 7770
remote 146.70.194.114 8443
remote 149.102.245.156 8443
remote 149.102.245.129 8443
remote 146.70.194.18 8443
remote 146.70.194.34 8443
remote 146.70.194.18 8443
remote 149.102.245.156 7770
remote 146.70.194.2 443
server-poll-timeout 20

remote-random
resolv-retry infinite
nobind

cipher AES-256-GCM

setenv CLIENT_CERT 0
tun-mtu 1500
mssfix 0
persist-key
persist-tun

reneg-sec 0

remote-cert-tls server
auth-user-pass .password

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

<ca>
-----BEGIN CERTIFICATE-----
MIIFnTCCA4WgAwIBAgIUCI574SM3Lyh47GyNl0WAOYrqb5QwDQYJKoZIhvcNAQEL
BQAwXjELMAkGA1UEBhMCQ0gxHzAdBgNVBAoMFlByb3RvbiBUZWNobm9sb2dpZXMg
QUcxEjAQBgNVBAsMCVByb3RvblZQTjEaMBgGA1UEAwwRUHJvdG9uVlBOIFJvb3Qg
Q0EwHhcNMTkxMDE3MDgwNjQxWhcNMzkxMDEyMDgwNjQxWjBeMQswCQYDVQQGEwJD
SDEfMB0GA1UECgwWUHJvdG9uIFRlY2hub2xvZ2llcyBBRzESMBAGA1UECwwJUHJv
dG9uVlBOMRowGAYDVQQDDBFQcm90b25WUE4gUm9vdCBDQTCCAiIwDQYJKoZIhvcN
AQEBBQADggIPADCCAgoCggIBAMkUT7zMUS5C+NjQ7YoGpVFlfbN9HFgG4JiKfHB8
QxnPPRgyTi0zVOAj1ImsRilauY8Ddm5dQtd8qcApoz6oCx5cFiiSQG2uyhS/59Zl
5wqIkw1o+CgwZgeWkq04lcrxhhfPgJZRFjrYVezy/Z2Ssd18s3/FFNQ+2iV1KC2K
z8e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6KcqncX2Hx9hjfVxspBZ
DrVH6uofCmd99GmVu+qizybWQTrPaubfc/a2jJIbXc2bRQjYj/qmjE3hTlmO3k7V
EP6i8CLhEl+dX75aZw9StkqjdpIApYwX6XNDqVuGzfeTXXclk4N4aDPwPFM/Yo/e
KnvlNlKbljWdMYkfx8r37aOHpchH34cv0Jb5Im+1H07ywnshXNfUhRazOpubJRHn
bjDuBwWS1/Vwp5AJ+QHsPXhJdl3qHc1szJZVJb3VyAWvG/bWApKfFuZX18tiI4N0
EA==
-----END CERTIFICATE-----
</ca>

<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
6acef03f62675b4b1bbd03e53b187727
423cea742242106cb2916a8a4c829756
3d22c7e5cef430b1103c6f66eb1fc5b3
75a672f158e2e2e936c3faa48b035a6d
e17beaac23b5f03b10b868d53d03521d
8ba115059da777a60cbfd7b2c9c57472
78a15b8f6e68a3ef7fd583ec9f398c8b
d4735dab40cbd1e3c62a822e97489186
c30a0b48c7c38ea32ceb056d3fa5a710
e10ccc7a0ddb363b08c3d2777a3395e1
0c0b6080f56309192ab5aacd4b45f55d
a61fc77af39bd81a19218a79762c3386
2df55785075f37d8c71dc8a42097ee43
344739a0dd48d03025b0450cf1fb5e8c
aeb893d9a96d1f15519bb3c4dcb40ee3
16672ea16c012664f8a9f11255518deb
-----END OpenVPN Static key V1-----
</tls-crypt>
```

```bash
sudo vim /etc/openvpn/.password
```

```txt
u97gzcUx2gei2toi
I78VQcnazNoOY8jzpqBwuw38HglJHK21
```

```bash
sudo systemctl enable openvpn.service
```