0

I want to set up IPv6 address on my OpenVPN server operating in TAP mode.

According to documentation, ifconfig expects two parameters: l and rn. For TAP devices, l is local address, rn is netmask.

It works fine with IPv4: e.g. ifconfig 192.168.2.1 255.255.255.0.

I tried to give it IPv4-like netmask, which is something not really used in IPv6, but I gave it a try. OpenVPN accepted this syntax, but no IP appeared on the interface:

ifconfig-ipv6 fdxx:xxxx:xxxx:2::1 ffff:ffff:ffff:ffff:: # no address on the iface

Apparently, this commit this commit should've implemented prefix length syntax in OpenVPN. It didn't accept single argument, complained that the second one is missing. I tried various dummy arguments, like ::. The server accepted them, but, again, the interface got no address.

ifconfig-ipv6 fdxx:xxxx:xxxx:2::1/64 # complains
ifconfig-ipv6 fdxx:xxxx:xxxx:2::1/64 :: # no address on the iface
WGH
  • 145
  • 9

1 Answers1

1

As it turned out, this question has been posted on mailing lists earlier.

The correct syntax is indeed ifconfig-ipv6 fdxx:xxxx:xxxx:2::1/64 ::, but you also need to set tun-ipv6 (even if you're using TAP mode, which is pretty confusing).

However, as of at least OpenVPN 2.3.4, it won't work unless you have IPv4 address specified with ifconfig. Might be a bug, or I'm missing something else.

WGH
  • 145
  • 9