Giter Club home page Giter Club logo

openvpnfornordvpn's Introduction

10.5281/zenodo.1050410

Custom scripts for Nordvpn at OpenWRT

NordVPN: High-level VPN service

OpenWRT: OpenWrt is a highly extensible GNU/Linux distribution for embedded devices (typically wireless routers). Unlike many other distributions for these routers, OpenWrt is built from the ground up to be a full-featured, easily modifiable operating system for your router. In practice, this means that you can have all the features you need with none of the bloat, powered by a Linux kernel that's more recent than most other distributions.

Based on: https://nordvpn.com/tutorials/openwrt/openvpn/

You need to install OpenWRT packages only once

opkg update
opkg install openvpn-openssl
opkg install ip-full
opkg install luci-app-openvpn

Since I'm currently using a very slow and unstable 3g internet provider, I don't keep the vpn on all the time, hence I made an optimized Watchdog that will check and restore the vpn only after its first use since last boot. I just keep the openvpn service disable so that it will be started only by demand. I also doesn't keep aria2 or transmission services running all the time in hope to save some electricity.

The script also works perfectly if you have the openvpn service enabled in order to keep you vpn lasting.

Description of included files

Files Usage Description
/root/install-nordvpn.sh On command line Work in progress Script planned to install NordVPN official files and my custom scripts
/root/nordvpn.sh On command line This script provide a User Interface to change between the thousands of NordVPN files.
/root/menu.sh On command line This script provide a User Interface to most common OpenWRT/LEDE operations as start/stop the services OpenVPN, Aria2, Transmission
/etc/openvpn/nordvpn-auth Configuration It contains two lines: email and password for authentication on NordVPN service.
/etc/openvpn/preventleak.sh On demand This script is called by the auxiliary scripts to check if the VPN has got down. If yes, it blocks the packet forwarding in the firewall.
/etc/openvpn/watchdog.sh On demand This script is called on boot by rc.local and will monitor the connection through ping every two minutes. If something goes wrong, it restarts firewall or network service. It also checks if the VPN tunnel is down, preventing leaking, and monitors it, restarting it. It will be kept running. You can check its actions on logread.
/etc/openvpn/nordvpn.ovpn Symbolic link It will be referred by /etc/config/openvpn. It points the current NordVPN's server configuration file in /etc/openvpn/nordvpn/
/etc/openvpn/nordvpn/* Folder This folder contains all NordVPN's server configuration files.
/etc/openvpn/openvpn.lock Lock file It will indicate that a VPN connection was started after boot.
/etc/firewall.user On demand This script is called every time the firewall conditions changes. It will call the preventleak.sh script in order to check if the VPN still is up.
/etc/rc.local On demand This script is run on boot. It will clean any /etc/openvpn/openvpn.lock, any blocked firewall forwarding and it will run /etc/openvpn/watchdog.sh
/etc/config/openvpn Configuration Part of the full file where is the modifications needed to use openvpn
/etc/config/firewall Configuration Part of the full file where is the modifications needed to use openvpn
/etc/config/network Configuration Part of the full file where is the modifications needed to use openvpn
/etc/hotplug.d/iface/99-preventleak On demand This is script is called every time some network interface changes. It will call the preventleak.sh script in order to check if the VPN still is up.

NordVPN PROMO CODE

High-quality VPN service with a huge discount

  • No Logs Policy
  • P2P Allowed
  • Onion Over VPN
  • Unlimited Bandwidth
  • Double Encryption

Use my referral link (https://ref.nordvpn.com/?id=69780735) and one of the promo codes:


openvpnfornordvpn's People

Contributors

oilervoss avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.