Adding ipv6 tunneling through existing ipv4 openvpn server?

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
papagirafe
DD-WRT Novice


Joined: 26 Feb 2018
Posts: 14

PostPosted: Fri Mar 12, 2021 23:11    Post subject: Adding ipv6 tunneling through existing ipv4 openvpn server? Reply with quote
Hi!

I have a functional private OpenVPN server (running on a mini router) that redirect all clients IPv4 internet traffic through it. I am looking to also redirect all internet IPv6 traffic through the same IPv4 connection.

Unfortunately, I need serious help here because the number of options regarding addressing is overwhelming and all the examples I have seen are partial or for a different setup.

Here are more details about the current configuration:
Main router: provided by ISP,fiber and phone service more specifically a Mitrastar GPT-2741GNAC-N2. THe IPv6 info get from the router: delegated Prefix, Link-Local Addres - LAN and Global IPv6 Address - WAN.

The router I configured is a GL.Inet 6416 (basically TP-Link TL-WR710N with more memory and only one lan and one wan) running DD-WRT v3.0-r45219 std (12/31/20). WAN assigned as LAN, DHCP disabled, main router assigns static IPv4 address and opens a port for it. VPN server redirects IP4 traffic.

I just need a bit of guidance on which IPV6 guides are applicable.
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12921
Location: Netherlands

PostPosted: Sat Mar 13, 2021 7:19    Post subject: Reply with quote
I am also very interested and OpenPVN 2.5 which is present in recent builds should be fully capable of dealing with IPv6.

Unfortunately I do not have IPv6 so not much help from me, but I hope others with IPv6 will chime in.

In the server setup guide is just a small paragraph with actually only the reference to this :
https://community.openvpn.net/openvpn/wiki/IPv6

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sat Mar 13, 2021 8:51    Post subject: Reply with quote
I have done it with Wiregard.

You must get a Delegated Prefix that is greater than 64 from the ISP where the VPN Server is located.

Break up the Delegated Prefix up into 64 sub-nets and use one for the VPN clients.
papagirafe
DD-WRT Novice


Joined: 26 Feb 2018
Posts: 14

PostPosted: Sat Mar 13, 2021 20:17    Post subject: Reply with quote
Per Yngve Berg wrote:
I have done it with Wiregard.

You must get a Delegated Prefix that is greater than 64 from the ISP where the VPN Server is located.

Break up the Delegated Prefix up into 64 sub-nets and use one for the VPN clients.


Thanks but It is precisely the address range that I should use for VPN clients that is a total confusion for me. I have to take into consideration that the dd-wrt router in my scenario is basically just a small linux like server on an existing network. The main router and allocation of a second 64 sub-net from the ISP is not an option from what I understand (but I could be totally wrong).
In that context I do not understand which "IPV6 type" I should use on the IPV6 page since the router's is inside a LAN.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sun Mar 14, 2021 8:58    Post subject: Re: Adding ipv6 tunneling through existing ipv4 openvpn serv Reply with quote
papagirafe wrote:
Main router: provided by ISP,fiber and phone service more specifically a Mitrastar GPT-2741GNAC-N2. THe IPv6 info get from the router: delegated Prefix, Link-Local Addres - LAN and Global IPv6 Address - WAN.


Can you set the Delegated Prefix Size to 48, 56 or 60?
papagirafe
DD-WRT Novice


Joined: 26 Feb 2018
Posts: 14

PostPosted: Sun Mar 14, 2021 16:48    Post subject: Re: Adding ipv6 tunneling through existing ipv4 openvpn serv Reply with quote
Per Yngve Berg wrote:

Can you set the Delegated Prefix Size to 48, 56 or 60?

I've done some further reading and this looks like the solution. I'll post again when I get some meaningful results (positive or negative Smile )
papagirafe
DD-WRT Novice


Joined: 26 Feb 2018
Posts: 14

PostPosted: Mon Mar 15, 2021 19:55    Post subject: Reply with quote
So far I have been able to make my 6416 router work with the ipv6 protocol basically by enabling ipv6 with prefix delegation/64 and disabling all the other options. I have seen this solution in other forums when searching for WAP (wireless access point with ethernet link).

I forgot to mention that, in the target environment where I want to install the 6416/openvpn server, I do not have control of the main router (I do not even have the pw!) so I everything has to be contained in my little box. The only thing that was provided to me is a static ipv4 address. I currently have a very similar router (AR150) working over there with an IPv4 only vpn. (My assumption is that the router over there will give me an prefix delegation/64.) As a reminder, I am trying to tunnel IPv6 through/inside this IPv4 opnvpn server.

So my problem now is to discover how to get a new block of adresses from th ISP (at no cost $$$) like suggested before or to use the singlepublic address of the 6416 with devious IPv6 NATing for internal VPN ipv6 adresses like I am doing in IPv4.

Any better ideas?
papagirafe
DD-WRT Novice


Joined: 26 Feb 2018
Posts: 14

PostPosted: Wed Mar 24, 2021 1:10    Post subject: Reply with quote
Per Yngve Berg wrote:
I have done it with Wiregard.

You must get a Delegated Prefix that is greater than 64 from the ISP where the VPN Server is located.

Break up the Delegated Prefix up into 64 sub-nets and use one for the VPN clients.


Update: after further investigation, I have confirmed that I receive a /48 delegated prefix from the ISP which make this solution possible. What I am unclear about is how and where the delegated breakup has to occur. In the main ISP router or my little 6416 box? I would prefer the second choice. Do you have any more details on this process (or a reference) ty in advance
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Wed Mar 24, 2021 17:42    Post subject: Reply with quote
This is how to break it up on interfaces for the main router:
Code:
interface eth0 {
 send ia-pd 0;
 send rapid-commit;
 request domain-name-servers;
 script "/sbin/dhcp6c-state";
};
id-assoc pd 0 {
     prefix ::/48 infinity;
     prefix-interface br0 {
          sla-id 0;
         sla-len 16;
     };
     prefix-interface br1 {
          sla-id 1;
         sla-len 16;
     };
     prefix-interface eth1.3 {
          sla-id 2;
         sla-len 16;
     }; 
      prefix-interface wlan1 {
          sla-id 16;
         sla-len 16;
     }; 
};
id-assoc na 0 {  };


sla-id can be from 0 to 32000 with a 16 bit sub-netting. sla-len=128-48-64=16
papagirafe
DD-WRT Novice


Joined: 26 Feb 2018
Posts: 14

PostPosted: Thu Mar 25, 2021 22:23    Post subject: Reply with quote
Per Yngve Berg wrote:
This is how to break it up on interfaces for the main router:
Code:
interface eth0 {
 send ia-pd 0;
 send rapid-commit;
 request domain-name-servers;
 script "/sbin/dhcp6c-state";
};
id-assoc pd 0 {
     prefix ::/48 infinity;
     prefix-interface br0 {
          sla-id 0;
         sla-len 16;
     };
     prefix-interface br1 {
          sla-id 1;
         sla-len 16;
     };
     prefix-interface eth1.3 {
          sla-id 2;
         sla-len 16;
     }; 
      prefix-interface wlan1 {
          sla-id 16;
         sla-len 16;
     }; 
};
id-assoc na 0 {  };


sla-id can be from 0 to 32000 with a 16 bit sub-netting. sla-len=128-48-64=16


Thanks for the insight, it make things a lot clearer! Unfortunately in the target environment I have virtually no control over the ISP provided router. I might be able to restrict the range of DCHPv6 adresses like on my ISP's router but that is pushing my luck. I could flash "openwrt" on my box and add the NAT6 package to share a single IPV6 but I would still prefer DD-WRT.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Thu Mar 25, 2021 22:56    Post subject: Reply with quote
With a VPN, get a delegated prefix from the vpn provider that can be router through the vpn.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum