OpenVPN Server 2.4 disable IPV6

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
zhamm
OpenVpn Newbie
Posts: 3
Joined: Fri May 21, 2021 1:33 pm

OpenVPN Server 2.4 disable IPV6

Post by zhamm » Fri May 21, 2021 1:57 pm

I'm running an openvpn server that I can successfully connect to and route through using IPV4. However, I have some cellular network clients (Apple iOS) that insist on connecting via IPV6, which I don't want. The iOS devices are getting both IPV4 and IPV6 addresses from the cellular provider, but the openvpn connect client wants to use IPV6, even when told not to. The same iOS device will connect successfully on IPV4 if on WiFi LAN but will use IPV6 when on LTE. How do I completely disable IPV6 in OpenVPN?

Server: OpenVPN 2.4 (Ubuntu repo version)
Client: OpenVPN 2.5.3 (iOSversion)

1. I have tried configuring the server and client both with "proto udp4", but the connection is still IPV6 on these devices.
2. I've disabled IPV6 on bootup in the OS kernel (Ubuntu 20.04) and rebooted. There are no IPV6 addresses for eth0 or lo, but tun0 still seems to generate an IPV6 address when connecting via cellular.

3. Server.conf:
port 1194
proto udp4
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nogroup
persist-key
persist-tun
verb 3
crl-verify crl.pem
explicit-exit-notify

4. client.conf
client
dev tun
proto udp4
remote xxx.xxx.xxx.xxx 1194 udp4
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
block-outside-dns
verb 3

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN Server 2.4 disable IPV6

Post by TinCanTech » Fri May 21, 2021 6:29 pm

If your server does not listen on IPv6 then the clients cannot connect with IPv6.

zhamm
OpenVpn Newbie
Posts: 3
Joined: Fri May 21, 2021 1:33 pm

Re: OpenVPN Server 2.4 disable IPV6

Post by zhamm » Tue May 25, 2021 9:13 pm

Yeah, except I have evidence otherwise. iPad client constantly connects as IPV6 even though I have no IPV6 enabled on server at kernel level. Very weird.
Image

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN Server 2.4 disable IPV6

Post by TinCanTech » Tue May 25, 2021 9:30 pm

I expect, if you post your logs, we will find something ..

viewtopic.php?f=30&t=22603
Last edited by TinCanTech on Tue May 25, 2021 9:32 pm, edited 1 time in total.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN Server 2.4 disable IPV6

Post by TinCanTech » Tue May 25, 2021 9:31 pm

zhamm wrote:
Fri May 21, 2021 1:57 pm
How do I completely disable IPV6 in OpenVPN?
Disable it in your server OS. OpenVPN always uses v6, if it can.

Post Reply