ipv6 bypassing VPN

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
Anybody
OpenVpn Newbie
Posts: 3
Joined: Tue Jan 22, 2013 11:28 am

ipv6 bypassing VPN

Post by Anybody » Tue Jan 22, 2013 11:40 am

Hi everyone,

thanks for making the great iOS App! It worked really well and I've been able to set up a OpenVPN thingy using my Linux Server for the first time without any major hickups by following guides and reading documentation!

One (for most people probably very minor) thing I've noticed though:
My Server is so far only configured for ipv4, therefor also OpenVPN on the Server is running with v4 IPs.
[i'm using the tun device, server 10.8.0.0 255.255.255.0, push "redirect-gateway def1", push "dhcp-option DNS (myserverip-which-does-public-dns) - and i've configured iptables to do NAT]

On my home network however I've also got ipv6. The iOS device therefor is connected by both ipv4 and ipv6 to the internet.
Any server that is reachable via ipv6 will therefor bypass the VPN! Even though the VPN is connected and all data should be securely sent over the VPN, the v6 data does not get sent over VPN and will silently bypass it.

Due to the mediocre adoption of v6, this is probably not a huge problem yet... Still, this does strike me as a slight security problem in case you had hoped to tunnel all data across an insecure network using the VPN and suddenly some of the data now gets sent in plain.

Does someone know a simple solution for this? It's not possible to disable ipv6 in iOS (as far as i know), so the only solution i could think of is configuring the OpenVPN Server to also provide an IPV6 gateway... Which would be a lot of work since I don't have much experience with ipv6 on the server yet ;)
(also, since ipv6 in openssl has officially only been supported for like a few weeks, there are probably a lot less guides on how to do it)

Any ideas?

rudivd
OpenVpn Newbie
Posts: 3
Joined: Wed Jan 23, 2013 11:57 am

Re: ipv6 bypassing VPN

Post by rudivd » Wed Jan 23, 2013 12:01 pm

Hi,

On a slightly related topic: How do I force Ovpn Connect to use IPv4 to connect to the
server, as my server has both IPv4 and IPv6 IP numbers, (and DNS entries) but the ovpn
daemon only listens on the v4 address. If I have the ios in an v4/v6 environment the app
seens to take the v6 address of the server to try to connect to... I want to force this to v4.

Rudi

Anybody
OpenVpn Newbie
Posts: 3
Joined: Tue Jan 22, 2013 11:28 am

Re: ipv6 bypassing VPN

Post by Anybody » Wed Jan 23, 2013 11:59 pm

Couldn't you solve this by making a subdomain v4.yourserver.net and pointing that only to an ipv4 address?
And then using this domain to connect to?

User avatar
jamesyonan
OpenVPN Inc.
Posts: 169
Joined: Thu Jan 24, 2013 12:13 am

Re: ipv6 bypassing VPN

Post by jamesyonan » Thu Jan 24, 2013 12:35 am

Re: the issue of IPv6 leakage when the VPN tunnel is IPv4-only, I've opened up a ticket with Apple about this, since they would need to extend the iOS VPN Framework API to allow VPN clients to request that IPv6 routing should be disabled when the VPN tunnel is IPv4-only.

In the short term, to work around this, you would need to push an ifconfig-ipv6 directive to the client, and then intercept the IPv6 traffic on the server.

If you want to disable IPv6, you would need to install ip6tables
rules on the server to send an ICMPv6 administratively prohibited when IPv6 packets come over the tunnel. That would cause client-side apps to revert to IPv4.

James

Post Reply