NAT for protocol 41 (ipv6 encapsulation) working?

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

Post Reply
Adri
Posts: 46
Joined: Wed Jul 20, 2011 4:03 am

NAT for protocol 41 (ipv6 encapsulation) working?

Post by Adri »

I am trying to setup a 6in4 tunnel to Hurricane Electrics tunnel broker.
Using stock firmware on a Netgear WNDR3700v1, this works fine with my local ipv4 address of 192.168.1.3. The stock firmware automatically does NAT for protocol 41 and is based on a very old version of OpenWRT.

Using the exact same tunnel with Gargoyle 1.9.x (from ispysail), I can't get the tunnel to work.
Every ping and other packet gets a 'Destination port unreachable.' error from the other end of the tunnel.
This seems to be because the outgoing protocol 41 packets don't have their local address replaced with the public address of the WAN interface by Gargoyle.
For normal ipv4 packets, NAT works fine.

Does anyone have an idea how to setup a 6in4 tunnel from the local net behind Gargoyle?
Would the OpenWRT method https://wiki.openwrt.org/doc/uci/network6 for a 6in4 tunnel be possible on Gargoyle?

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: NAT for protocol 41 (ipv6 encapsulation) working?

Post by Lantis »

All IPv6 related protocols and software is stripped from gargoyle. You'd need to install them and set them up from the command line.
Yes most setups applicable to openwrt work on gargoyle.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Adri
Posts: 46
Joined: Wed Jul 20, 2011 4:03 am

Re: NAT for protocol 41 (ipv6 encapsulation) working?

Post by Adri »

6in4 packets for the tunnel are encapsulated in ipv4 IP packets, using protocol type 41.
This means for gargoyle and NAT, it is just a normal ipv4 IP packet, except with a different type.

How is the NAT handled in Gargoyle?
If I can add the extra protocol type to the standard NAT, I don't need any ipv6 support from Gargoyle to get the tunnel running.
Only when Gargoyle needs to setup the tunnel and forward ipv6, would I need to install all the ipv6 modules and setup from the command line.
I would prefer to just make the NAT working.

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: NAT for protocol 41 (ipv6 encapsulation) working?

Post by Lantis »

The first paragraph in the wiki you linked says that 6in4 needs to be installed.
In openwrt it is now default.
In gargoyle these are all stripped out. That is what I'm referring to.
I think without these packages gargoyle won't understand what protocol 41 is or how to identify it.

But, it sounds like you know more about it than I. Just give it a go.
You can't really break anything.

In general, any wiki for openwrt works for gargoyle
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Adri
Posts: 46
Joined: Wed Jul 20, 2011 4:03 am

Re: NAT for protocol 41 (ipv6 encapsulation) working?

Post by Adri »

Lantis,

Before I go the route of installling all ipv6 modules and configuring the tunnel on Gargoyle, I'd like to try geting the NAT working first.
All that is needed for this is generic ipv4 support. no special modules etc are needed, everything is in the kernel with ipv4.

Can you point me to the relevant config files or modules which handle ipv4 NAT in gargoyle?
Is it iptables or some other module?

Thanks,

Adri.

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: NAT for protocol 41 (ipv6 encapsulation) working?

Post by Lantis »

I think NAT is handled by the netfilter module for the firewall.
And most firewall things are handled by iptables
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Adri
Posts: 46
Joined: Wed Jul 20, 2011 4:03 am

Re: NAT for protocol 41 (ipv6 encapsulation) working?

Post by Adri »

Thanks,

I'll have a look at the netfilter configuration and see if it can be adapted.

Adri
Posts: 46
Joined: Wed Jul 20, 2011 4:03 am

Re: NAT for protocol 41 (ipv6 encapsulation) working?

Post by Adri »

It seems gargoyle is not really suited for IPV6.
Installing OpenWRT CC has IPV6 support out of the box and after installing the 6in4 package, setting up a tunnel is straight forward.

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: NAT for protocol 41 (ipv6 encapsulation) working?

Post by Lantis »

I did say that lol. :roll:
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply