maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   nat64d & T-Mobile updates (https://talk.maemo.org/showthread.php?t=80958)

Luke-Jr 2011-12-18 14:54

nat64d & T-Mobile updates
 
1 Attachment(s)
T-Mobile's new IPv6 APN has a different NAT64 subnet: fd01:353:dead:beef:face::/96
I've updated nat64d with this and built a replacement for myself. I'm posting it here in case anyone else needs it. Note that I compiled this natively on my N900's hardfp GCC 4.5 Gentoo install, and I make no guarantees that it's binary-compatible with Maemo (though it seems to work for me in Maemo too), or really ANY guarantees AT ALL. ie, no warranty, standard disclaimer.

Don't forget to "Thank" me ;)

nat64d is under the Apache 2.0 license. Changes made to source follow:
Code:

diff -r 2f869feb1fda tun/nat64d.h
--- a/tun/nat64d.h      Sat Dec 10 12:05:38 2011 -0600
+++ b/tun/nat64d.h      Sun Dec 18 16:10:33 2011 -0500
@@ -27,10 +27,10 @@
 // 10.255.255.0/24
 #define IPV4_LOCAL_SUBNET 0x0affff00
 
-// 2607:fb90:beef:feed::/96
-#define IPV6_NAT64_SUBNET_1 0x2607fb90
-#define IPV6_NAT64_SUBNET_2 0xbeeffeed
-#define IPV6_NAT64_SUBNET_3 0x0
+// fd01:353:dead:beef:face::/96
+#define IPV6_NAT64_SUBNET_1 0xfd010353
+#define IPV6_NAT64_SUBNET_2 0xdeadbeef
+#define IPV6_NAT64_SUBNET_3 0xface0000
 #define IPV6_NAT64_SUBNET_4 0x0
 
 #endif /* __NAT64D_H__ */


Radu 2011-12-19 02:20

Re: nat64d & T-Mobile updates
 
Wow, this fixed my problems, thanks a lot!

bunanson 2012-01-18 07:31

Re: nat64d & T-Mobile updates
 
Hi, everybody, happy new year!

Radu: What has been fixed? Does your skype work? and nokia map? I already have the previous nat64 installed, everything works except skype and nokia map? How do I use this new nat64d?

Tia,

script.ninja 2012-02-16 04:03

Re: nat64d & T-Mobile updates
 
Quote:

Originally Posted by bunanson (Post 1152209)
Hi, everybody, happy new year!

Radu: What has been fixed? Does your skype work? and nokia map? I already have the previous nat64 installed, everything works except skype and nokia map? How do I use this new nat64d?

Tia,

Took me a few minutes to figure out how to fix this too...I figured it out from the fact that the nat64d file in the zip showed as green (executable) in ls, and then from looking at the /etc/network/if-up.d/nat64-up script and realizing that was the name of the executable it calls.

All you do is replace /usr/sbin/nat64d with the one from the zipfile.

Lo and behold, TheOneRing and my SIP account will connect through TMo again.

{off-topic}Maybe for an encore I'll take another crack at figuring out why sharing that connection with an Android device never would work for me...I'm trying to resist temptation and hold off on trying to set up a Power Kernel/Nemo/NITDroid triple boot until there are instructions I understand for using NITDroid with U-Boot...{/off-topic}

stlpaul 2012-03-29 06:06

Re: nat64d & T-Mobile updates
 
1 Attachment(s)
IPv6 is now in the production network (epc.tmobile.com) with new nat64 settings:

Code:

// fd00:976a:c000:59c4::/96
#define IPV6_NAT64_SUBNET_1 0xfd00976a
#define IPV6_NAT64_SUBNET_2 0xc00059c4
#define IPV6_NAT64_SUBNET_3 0x0
#define IPV6_NAT64_SUBNET_4 0x0

attached is the updated nat64d, unzip it and replace the one in /usr/sbin with this version (be sure it is set executable) and reconnect to the GPRSv6.

script.ninja 2012-04-15 02:29

Re: nat64d & T-Mobile updates
 
Which version (if any) should be the right settings for the epc-etcetera connection?

stlpaul 2012-07-11 16:58

Re: nat64d & T-Mobile updates
 
It seems that the t-mobile nat64 subnet changes, I don't think having it hardcoded into nat64d is a workable solution anymore. I'm working on backporting the automatic subnet and mtu detection from android clat which itself was based onthe n900 nat64d so the code is similar. I will post an update here if I get it working!

stlpaul 2012-07-12 21:19

Re: nat64d & T-Mobile updates
 
1 Attachment(s)
Attached please find the modified nat64d binary + source code patch. It auto-detects your NAT64 subnet, so it should work for t-mobile or any other ipv6-only connection that supports NAT64. It is an ugly hack job but it works for me. :D

Please note the hostname it uses to detect is ipv4.google.com -- if you have a mobile operator or government who blocks or intercepts google traffic, this may cause it not to work. In that case edit the source code and change the define PLAT_FROM_DNS64_HOSTNAME in nat64d.h to some other host that only has an IPv4 IP and not IPv6.

You must have already installed the nat64d package from:
https://code.google.com/p/n900ipv6/wiki/Nat64D

then copy my new nat64d into /usr/sbin/ and reconnect to your IPv6 GPRS access point. Original source code can be downloaded from the above page as well.

Subnet autodetection code was taken from android clat whose source code is available here:
https://github.com/ddrown/android_external_android-clat

A full port of android-clat would probably be best, since it includes many small fixes and improvements over the maemo version of nat64d, but it is beyond my skills or time limit.


All times are GMT. The time now is 13:17.

vBulletin® Version 3.8.8