I have openvpn 2.4.7 on Ubuntu 20.04.2 LTS server and my client is Archlinux with openvpn 2.5.1. I noticed IPv6 leak so after some research decided not to disable IPv6 at my kernel level and make IPv6 available for use. Here is my server.conf:
local 127.0.0.1
port 1194
proto tcp
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 bypass-dhcp"
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
status openvpn-status.log
verb 3
crl-verify crl.pem
server-ipv6 2001:0db8:ee00:abcd::/64
tun-ipv6
push tun-ipv6
ifconfig-ipv6 2001:0db8:ee00:abcd::1 2001:0db8:ee00:abcd::2
push "route-ipv6 2001:0db8:ee00:ee00::2/64"
push "route-ipv6 2000::/3"
The last 6 lines added after reading a solution (IPs are not related to my server, just from tutorial). Here is my client.ovpn:
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
route server_ip 255.255.255.255 net_gateway
client
dev tun
proto tcp
sndbuf 0
rcvbuf 0
remote 127.0.0.1 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
comp-noadapt
auth-nocache
auth SHA512
key-direction 1
verb 3
<ca>
...
</tls-crypt>
The reason my client connects to 127.0.0.1 1194 is I use stunnel which is listening on 1194.
When I visit https://ipv6-test.com without VPN I have both IPv4 and IPv6 of my ISP. With VPN (and those 6 lines added) I just have IPv4 of my VPN server and for IPv6 I get Not supported which should be my VPN server. So far at least IPv6 is disabled when using client without manipulationg kernel parameters but I want a working IPv6.
How can I fix this issue?