You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
2.0 KiB

  1. # OpenWrt Simple VPNBypass
  2. A simple PROCD-based vpnbypass init script for OpenWrt/LEDE Project. Useful if your router accesses internet thru VPN client/tunnel, but you want specific traffic (ports, IP ranges, domains or local IP ranges) to be routed outside of this tunnel.
  3. # Features
  4. - Routes Plex Media Server traffic outside of the VPN tunnel.
  5. - Allows you to define IPs/ranges in local network so that their traffic is routed outside of the VPN tunnel.
  6. - Allows you to define list of domain names which are accessed outside of the VPN tunnel (useful for Netflix, Hulu, etc).
  7. - Doesn't stay in memory -- creates the iptables rules which are automatically updated on WAN up/down.
  8. # Requirements
  9. This service requires following packages to be installed on your router: ip-full ipset iptables dnsmasq-full (dnsmasq-full requires you uninstall dnsmasq first). Run the following commands to satisfy the requirements:
  10. ```sh
  11. opkg update
  12. opkg remove dnsmasq ip; opkg install ip-full ipset iptables dnsmasq-full
  13. ```
  14. # How to install
  15. ```sh
  16. opkg update
  17. opkg install vpnbypass luci-app-vpnbypass
  18. ```
  19. Default install routes Plex Media Server traffic (port 32400) outside of the VPN tunnel, routes LogmeIn Hamachi traffic (25.0.0.0/8) outside of the VPN tunnel and also routes internet traffic from local IPs 192.168.1.80-192.168.1.88 outside of the VPN tunnel.
  20. # Documentation / Discussion
  21. Please head to OpenWrt/LEDE Project Forums for discussion of this script.
  22. # What's New
  23. 1.0.0:
  24. - Hotplug script created during install.
  25. 0.1.0:
  26. - Package built.
  27. - Support for user-defined ports implemented.
  28. - Support for user-defined routes implemented.
  29. - Support for user-defined local ranges implemented.
  30. 0.0.1:
  31. - Initial release.
  32. # Known Issues
  33. Until user-defined domains are supported within vpnbypass config, you can set domains to be accessed outside of VPN tunnel like so:
  34. ```sh
  35. uci add_list dhcp.@dnsmasq[-1].ipset='/github.com/plex.tv/google.com/vpnbypass'
  36. uci add_list dhcp.@dnsmasq[-1].ipset='/hulu.com/netflix.com/nhl.com/vpnbypass'
  37. uci commit dhcp
  38. /etc/init.d/dnsmasq restart
  39. ```