Page 1 of 2
OpenVPN and iOS App - TUN Setup Failed
Posted: Mon Feb 04, 2013 2:54 am
by slyx620
I'm on version 1.5.9 of Gargoyle on a TP-LINK wdr3600 and are having issues connecting via OpenVPN to the router when using my iPhone to connect via the OpenVPN app that was just released.
The message I'm getting is
Code: Select all
[route-gateway] [10.8.0.1]
1 [redirect-gateway] [def1]
2 [ping] [25]
3 [ping-restart] [180]
4 [route] [192.168.8.0] [255.255.255.0] [10.8.0.1]
5 [ifconfig] [10.8.0.11] [255.255.255.0]
2013-02-03 22:46:30 LZO-ASYM init swap=0 asym=0
2013-02-03 22:46:30 EVENT: ASSIGN_IP]2013-02-03 22:46:30 TUN Error: tun_builder_error: ifconfig addresses are not in the same /30 subnet (topology net30)
2013-02-03 22:46:30 EVENT: TUN_SETUP_FAILED tun_builder_error: ifconfig addresses are not in the same /30 subnet (topology net30) [ERR]
Can anyone help figure out what might be cause of this?
Re: OpenVPN and iOS App - TUN Setup Failed
Posted: Mon Mar 04, 2013 10:17 am
by pelowj
Same problem here, did you ever find a solution?
-JP
Re: OpenVPN and iOS App - TUN Setup Failed
Posted: Mon Mar 04, 2013 11:37 am
by pelowj
Ok, have it working now. Seems the problem lay in the fact that certain settings weren't being pushed to the iOS client.
To get it working I added the following lines to the /etc/openvpn/server.conf file.
Code: Select all
push "topology subnet"
push "dhcp-option DNS 192.168.0.1"
(Note that 192.168.0.1 is the non-standard address of my gargoyle router, you should change this to your router's own IP.)
Hit restart in the web interface, wait until it has completed and enjoy.
-jp
Re: OpenVPN and iOS App - TUN Setup Failed
Posted: Fri Nov 08, 2013 10:11 pm
by yc3948
Thanks!
Re: OpenVPN and iOS App - TUN Setup Failed
Posted: Wed Nov 13, 2013 10:15 am
by Eric
I think the key line above is the "push topology subnet" line, which is now included in any configuration generated by gargoyle 1.5.11. This was a fix included in the official release, no need for one of ispyisail's builds (though it will be there too). If you are on 1.5.11 but generated configuration files on an older version and preserved settings during upgrade it probably won't be there.
I was able to connect with an android client with adding just the "push topology subnet line", not the "dhcp-option DNS 192.168.0.1" line, which I do not think is necessary and is a command that is mostly for use with a TAP interface not a TUN interface like what gargoyle uses. I don't have any iOS devices (just android), so it would be helpful if someone with an iOS device could verify that the "dhcp-option DNS 192.168.0.1" is not necessary.
Re: OpenVPN and iOS App - TUN Setup Failed
Posted: Wed Nov 27, 2013 12:37 pm
by pelowj
My internal host names won't resolve without the dhcp-option.
-jp
Re: OpenVPN and iOS App - TUN Setup Failed
Posted: Sun Dec 01, 2013 5:00 pm
by maihacke
Default setup is not working for me.
The openvpn app shows
2013-12-01 21:25:20 OPTIONS:
0 [topology] [subnet]
1 [route-gateway] [10.8.0.1]
2 [redirect-gateway] [def1]
3 [ping] [25]
4 [ping-restart] [180]
5 [route] [192.168.2.0] [255.255.255.0] [10.8.0.1]
6 [ifconfig] [10.8.0.2] [255.255.255.0]
2013-12-01 21:25:20 LZO-ASYM init swap=0 asym=0
2013-12-01 21:25:20 EVENT: ASSIGN_IP
2013-12-01 21:25:20 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
The result is, that i can't access hosts in my internal lan.
After adding the following option to /etc/server.conf
push "route 192.168.2.0 255.255.255.0 vpn_gateway"
Internal lan access is working.
The log file now shows
2013-12-01 21:58:25 OPTIONS:
0 [topology] [subnet]
1 [route-gateway] [10.8.0.1]
2 [dhcp-option] [DNS] [192.168.2.1]
3 [route] [192.168.2.0] [255.255.255.0] [vpn_gateway]
4 [ping] [25]
5 [ping-restart] [180]
6 [route] [192.168.2.0] [255.255.255.0] [10.8.0.1]
7 [ifconfig] [10.8.0.2] [255.255.255.0]
2013-12-01 21:58:25 LZO-ASYM init swap=0 asym=0
2013-12-01 21:58:25 EVENT: ASSIGN_IP
2013-12-01 21:58:25 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
2013-12-01 21:58:25 Connected via tun
So there is still an error in the sent options (I think the problem is number 6). So this is ignored. My custom routing seems to fix that...
Re: OpenVPN and iOS App - TUN Setup Failed
Posted: Sat Apr 26, 2014 11:33 am
by pelowj
I've just upgraded to 1.6.1 (clean install), and I'm now having the same issue as maihacke.
Re: OpenVPN and iOS App - TUN Setup Failed
Posted: Sat Apr 04, 2015 11:09 am
by maihacke
Hello,
I just upgraded to new version 1.7.1
The problem still exists.
Could you change openvpn setup to automatically ad the following line to server.conf
push "route 192.168.2.0 255.255.255.0 vpn_gateway"
Obviously firts part had to be replaced by router subnet
Re: OpenVPN and iOS App - TUN Setup Failed
Posted: Tue Oct 06, 2015 3:09 pm
by maihacke
Sadly there is no developer reaction here in the forum, nor is this bug fixed. To just a short updated for everyone interested.
Since newer version there is a per client file with routing settings in /etc/openvpn/ccd
you have to change the push option there (replace gateway ip with "vpn_gateway" without ")