amuck-landowner

Question about OpenVPN 4to6

johnlth93

New Member
Hi,

I am wondering if anything know this.

I have been searching around for some times and tried lot of times.

Now i able to ipv6 assigned from server to client but there's no route to the internet.

Anyone could enlight me how to achieve this 4to6 thing?

I don't have native ipv6 that's why i trying to tap into a server's ipv6 and have a ipv6 connection on my laotop.
 

WebSearchingPro

VPS Peddler
Verified Provider
You can infact run a 4to6 tunnel over OpenVPN, however I have not been able to get it working successfully on my own just tweaking around with it.

https://www.zagbot.com/openvpn_ipv6_tunnel.html

Using a public 4to6 tunnel has its advantages and disadvantages, the main advantage being how easy it is to configure (I use (tunnelbroker.net) the disadvantage is that often you inherit various limitations such as endpoint authentication, for example you can't use tunnelbroker if you travel frequently as it gets quite annoying to have to update your settings, often ports are blocked and the connections are ratelimited.
 

johnlth93

New Member
You need an ipv4 to ipv6 tunnel, check this out:

http://en.wikipedia.org/wiki/List_of_IPv6_tunnel_brokers
I used HE tunnel before, it quite inconvenience as i always got different IP from my ISP (dynamic IP)

And some times i used Mobile Broadband with private IP i couldn't get HE to ping my side hence can't use the tunnel.


You can infact run a 4to6 tunnel over OpenVPN, however I have not been able to get it working successfully on my own just tweaking around with it.

https://www.zagbot.com/openvpn_ipv6_tunnel.html

Using a public 4to6 tunnel has its advantages and disadvantages, the main advantage being how easy it is to configure (I use (tunnelbroker.net) the disadvantage is that often you inherit various limitations such as endpoint authentication, for example you can't use tunnelbroker if you travel frequently as it gets quite annoying to have to update your settings, often ports are blocked and the connections are ratelimited.

 
I had read that article before, doesn't work exactly. I will try again when i am free.

Thanks though.
 

Danthe

New Member
At one point I had IPv6 working over OpenVPN flawlessly. I do remember that I was using bridged mode, but I've lost the configurations since then. I'll look around and see if I can find any information pertaining to this and let you know if I find anything.
 

johnlth93

New Member
 


Here is another link, looks interesting.

http://markusholtermann.eu/article/my-own-ipv6-tunnel-broker/

Good luck.
I've generally look over it, it might work i will try it when i have free time. Thanks much.

 


At one point I had IPv6 working over OpenVPN flawlessly. I do remember that I was using bridged mode, but I've lost the configurations since then. I'll look around and see if I can find any information pertaining to this and let you know if I find anything.
I think i can get tap/bridge mode to work but i want to take advantage of the new tun-ipv6 mode if possible.
 

Danthe

New Member
I just spent some time putting together a guide on how to set up OpenVPN TAP mode with IPv6 and then saw your last post :p

I would be interested in working with OpenVPN to figure out how to get IPv6 TUN mode working, however I don't have access to a machine with IPv6 at the moment.
 
For anyone else that is looking for this information, I'll post it! I had to copy/paste the BBcode from another window, so hopefully the colors in the code blocks don't get messed up.

If you've been allocated a /48, I suggest assigning a /64 to the server side OpenVPN interface.
If you've been allocated a /64, try using a /80 on your server side OpenVPN interface.
 
As an example, lets say that your provider has allocated 2001:db8:100:222::/64 to you.
For the sake of argument, we'll say this is native IPv6.
On your Ethernet interface, you'll have an IP address in the same range as your carriers IPv6 router...
So for example, their router is 2001:db8:100:111::1/64, you will assign 2001:db8:100:111::2/64 to eth0 (or your tunnel):


ip -6 address add 2001:db8:100:111::2/64 dev eth0
 
The next thing you need to be sure to do is add a default route back to your provider. To do this, something like the following should suffice:


ip -6 route add 2000::/3 via 2001:db8:100:111::1
 
At this point you should be able to ping out over IPv6 from the host. Try something like:


ping -6 ipv6.google.com

 
Since the provider is routing all traffic to your 2001:db8:100:222::/64 subnet to your IP on their subnet (2001:db8:100:111::2), as long as you have IPv6 routing enabled, any traffic destined to 2001:db8:100:222::/64 will hit your machine and should be forwarded out the correct interface.
 
The next thing you need to do is pick a subnet for your OpenVPN clients. We'll use 2001:db8:100:222:99::/80. Assuming you're using TAP mode for OpenVPN, you can use a configuration something like this:


# /etc/openvpn/server.conf
mode server
dev tap
secret your.key
up /etc/openvpn/ifup.sh

Code:
#!/bin/sh
# /etc/openvpn/ifup.sh
ip link set dev $dev up
ip -6 address add [color=#0000ff]2001:db8:100:222:[/color][color=#ffa500]99::1/80[/color] dev $dev
On the client side, it should be something like this:


# /etc/openvpn/client.conf
mode client
dev tap
secret your.key
remote your.server.domain.or.ip
up /etc/openvpn/ifup.sh
Code:
#!/bin/sh
# /etc/openvpn/ifup.sh
ip link set dev $dev up
ip -6 address add [color=#0000cd]2001:db8:100:222:[/color][color=#ff8c00]99::2/80[/color] dev $dev
ip -6 route add 2000::/3 via [color=#0000ff]2001:db8:100:222:[/color][color=#ffa500]99::1[/color]
 
I haven't tested this configuration, and the OpenVPN configurations are obviously incomplete, so I'm not sure if it will work. I believe the concept is correct, though I haven't messed with IPv6 in a while. For those who are curious, I adapted parts of this from the following guide: http://silmor.de/ipv6.openvpn.php
 
Also, OpenVPN 2.3 now supports IPv6 in TUN mode. This may be preferable depending on your setup. I'm not exactly sure how that works, so I'm not going to comment on it.
 
If I have anything incorrect, please feel free to correct me! I hope the color coding helped! :)
 
  • Like
Reactions: scv

Nyr

Active Member
All that workarounds are not needed anymore.

As Danthe said, OpenVPN 2.3 now supports IPv6 natively, but you need a small subnet for the setup.
 

johnlth93

New Member
I just spent some time putting together a guide on how to set up OpenVPN TAP mode with IPv6 and then saw your last post :p

I would be interested in working with OpenVPN to figure out how to get IPv6 TUN mode working, however I don't have access to a machine with IPv6 at the moment.


For anyone else that is looking for this information, I'll post it! I had to copy/paste the BBcode from another window, so hopefully the colors in the code blocks don't get messed up.
Yea, i would like to take advantage of the new tun-ipv6.

But someone might fine your post to be useful though.

I do got some LES with IPv6 if you wanted but it's a couple of /128 instead of a subnet though.
 
Top
amuck-landowner