setup/doc/vpn.md

40 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2022-02-14 13:22:54 +01:00
# Connect To VPN
* get the latest version of installed packages and refresh the repo cache
```
sudo apt update
```
* install VPN client directly from the official repository
```
sudo apt install openvpn --no-install-recommends
```
2022-02-16 13:29:01 +01:00
* install openresolv (a resolvconf implementation, i.e. a resolv.conf management framework)
2022-02-14 13:22:54 +01:00
```
2022-02-16 13:29:01 +01:00
sudo apt install openresolv --no-install-recommends
```
* append the following configuration to the OpenVPN client configuration file
```
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
```
* call client to connect to VPN
```
sudo openvpn --config <configuration file *.ovpn> --ca <certification authority file *ca.pem> --cert <certificate file *cert.pem --key <key file *cert.key
```
* verify that ```resolvconf``` works properly\
2022-02-16 13:30:50 +01:00
NOTE: You should see a ```resolv.conf``` file updated by
2022-02-16 13:31:31 +01:00
```resolvconf``` instead of e.g. ```NetworkManager```
2022-02-16 13:29:01 +01:00
```
cat /etc/resolv.conf
2022-02-14 13:22:54 +01:00
```
2022-02-17 13:19:29 +01:00
# Links
[How to configure OpenVPN to resolve local DNS & hostnames](https://steamforge.net/wiki/index.php/How_to_configure_OpenVPN_to_resolve_local_DNS_&_hostnames)