wiki:openvpn_installation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:openvpn_installation [2024/05/21 14:14] – add info how to redirect all or some traffice over VPN antisa | wiki:openvpn_installation [2025/03/03 16:15] (current) – [See also] add Revoke openvpn certificates antisa | ||
---|---|---|---|
Line 135: | Line 135: | ||
push " | push " | ||
+ | |||
In client.conf add: | In client.conf add: | ||
Line 148: | Line 149: | ||
Remove the redirect-gateway lines from conf. | Remove the redirect-gateway lines from conf. | ||
+ | <WRAP center round important 60%> | ||
+ | [[https:// | ||
+ | </ | ||
+ | |||
+ | ===== Redirect DNS through VPN ===== | ||
+ | First uninstall any other DNS server/ | ||
+ | |||
+ | apt install dnsmasq | ||
+ | |||
+ | Now make the /// | ||
+ | |||
+ | nameserver ::1 | ||
+ | nameserver 127.0.0.1 | ||
+ | options trust-ad | ||
+ | |||
+ | You might need to [[https:// | ||
+ | |||
+ | In /// | ||
+ | |||
+ | listen-address=:: | ||
+ | interface=tun0 | ||
+ | # Google' | ||
+ | server=8.8.8.8 | ||
+ | server=8.8.4.4 | ||
+ | |||
+ | Adapt the listen-address IP to your VPN interface IP and interface as well and uncomment '' | ||
+ | |||
+ | In /// | ||
+ | |||
+ | ... | ||
+ | push " | ||
+ | push " | ||
+ | ... | ||
+ | | ||
+ | <WRAP center round info 60%> | ||
+ | If you run into problems with DNS not going through VPN in Windows installed as a VM in Virtualbox for example, you will need to disable automatic metric on VPN interface and set it to lower then the default Ethernet or wifi. To check open the powershell and type '' | ||
+ | {{ : | ||
+ | </ | ||
+ | |||
+ | ==== Resolve specific domains names to hard-coded IP ==== | ||
+ | Say you need to always resolve example.org to 1.2.3.4 address, you have two options. | ||
+ | |||
+ | 1. Add the resolution to /// | ||
+ | |||
+ | ... | ||
+ | 1.2.3.4 www.example.org example.org | ||
+ | |||
+ | 2. Remove the above from /// | ||
+ | address=/ | ||
+ | |||
+ | Also [[https:// | ||
===== Firewall setup ===== | ===== Firewall setup ===== | ||
Line 159: | Line 211: | ||
#ZONE | #ZONE | ||
net | net | ||
- | vpn tun0 | + | vpn |
</ | </ | ||
Line 221: | Line 273: | ||
====== See also ====== | ====== See also ====== | ||
* [[wiki: | * [[wiki: | ||
+ | * [[wiki: | ||
+ | * [[wiki: | ||
====== References ====== | ====== References ====== | ||
* https:// | * https:// | ||
Line 229: | Line 283: | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
+ | * [[https:// | ||
wiki/openvpn_installation.1716300859.txt.gz · Last modified: 2024/05/21 14:14 by antisa