ericpaulbishop / gargoyle

Gargoyle Router Management Utility
http://www.gargoyle-router.com
469 stars 221 forks source link

OpenVPN: iOS client error: route destinations other than vpn_gateway or net_gateway are not supported #690

Closed netmonitoring closed 6 years ago

netmonitoring commented 6 years ago

Tested on: Router Model: Archer C7 V2 EU Firmware: Gargoyle 1.10.0-ar71xx

Client: iOS 10.3.0 OpenVPN 1.1.1 build 212 (iOS 64-bit)

Error: Error parsing IPv4 route: [route] [192.168.2.0] [255.255.255.0] [10.8.0.1] : tun_builder_route_error: route destinations other than vpn_gateway or net_gateway are not supported.

Solution: Modify /usr/lib/gargoyle/openvpn.sh script lines:

From: echo "push \"route $subnet_ip $subnet_mask $openvpn_server_internal_ip\"" >> "$client_ccd_file" To: echo "push \"route $subnet_ip $subnet_mask vpn_gateway\"" >> "$client_ccd_file"

From: echo "push \"route $subnet_ip $subnet_mask $openvpn_ip\"" >> "$client_ccd_file" To: echo "push \"route $subnet_ip $subnet_mask vpn_gateway\"" >> "$client_ccd_file"

To test solution:

  1. Rebuild routes using next commands:
    source /usr/lib/gargoyle/openvpn.sh
    update_routes
  2. Reconnect with OpenVPN client.
lantis1008 commented 6 years ago

Nite with this one that tests showed this to be incompatible with Gargoyle as a client at this stage, and that the change should perhaps not be a universal one.

netmonitoring commented 6 years ago

Tested with clients:

iOS 10.3.0 OpenVPN 1.1.1 build 212 (iOS 64-bit)

Debian 4.9.30-2+deb9u5 OpenVPN 2.4.0 x86_64-pc-linux-gnu

Windows 7 64bit OpenVPN 2.3.18 x86_64-w64-mingw32

ispyisail commented 6 years ago

Just for my own reference https://www.gargoyle-router.com/phpbb/viewtopic.php?f=6&t=11312

lantis1008 commented 6 years ago

This is now resolved (in the near future). As i said before, this change is not appropriate to apply to all clients. So it has been made configurable.