Skip to content

OpenVPN

Connect to any OpenVPN protocol-compatible server or service.



  1. Terminal window
    sudo apt install openvpn -y
  2. Terminal window
    mkdir -p /etc/openvpn/profile && cd /etc/openvpn/profile
  3. Terminal window
    nano server1-tcp80.ovpn
    server1-tcp80.ovpn
    # Comment out the line below
    # setenv opt block-outside-dns
    # Add after `route 0.0.0.0 0.0.0.0`
    setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    script-security 2
    up /etc/openvpn/update-resolv-conf
    down /etc/openvpn/update-resolv-conf
    down-pre
  4. Terminal window
    nano /etc/openvpn/update-resolv-conf
    update-resolv-conf
    # Add after examples
    # Add as many as you like, replace ip address
    foreign_option_1='dhcp-option DNS 208.67.222.222'
    foreign_option_2='dhcp-option DNS 208.67.222.220'
    foreign_option_3='dhcp-option DNS 146.112.128.66'
  5. Terminal window
    nano auth.txt
    auth.txt
    # Edit username and password
    username
    password
  6. Terminal window
    sudo openvpn --config /etc/openvpn/profile/server1-tcp80.ovpn
  7. Terminal window
    sudo killall openvpn