Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1.27 KB

README.md

File metadata and controls

36 lines (29 loc) · 1.27 KB

keenetic-openvpn-monitor

Scripts for automatically restarting OpenVPN if it becomes unresponsive on Asus Keenetic routers. Tested on models KN-1810 and KN-1811.

  1. Install ssh and OPKG file system on your router and login to sh
ssh root@router_ip
exec sh
  1. Copy monitor_vpn.sh to /opt/bin/monitor_openvpn. You can just copy-paste code using vi
vi /opt/bin/monitor_openvpn.sh
  1. Make it executable
chmod +x /opt/bin/monitor_openvpn.sh
  1. Now make a daemon that will start automaticall on the reboot of the router. Copy S99VPNChecker.sh to /opt/etc/init.d/S99VPNChecker.
vi /opt/etc/init.d/S99VPNChecker

Scripts located in /opt/etc/init.d/ are automatically started when the system boots up if their name begins with S. The number in the name, such as S99, determines the order of startup (the higher the number, the later the process will be started).

  1. Make it executable
chmod +x /opt/etc/init.d/S99VPNChecker
  1. Run the daemon (or reboot the router)
/opt/etc/init.d/S99VPNChecker start