NICMx / Jool

SIIT and NAT64 for Linux
GNU General Public License v2.0
320 stars 66 forks source link

jool does not support IPv4 embedded addressen in IPv6 #357

Closed telmich closed 3 years ago

telmich commented 3 years ago

Trying to use 2a0a:e5c1:12b:b00::147.78.194.2 in the configuration results in a parsing error, while this is a perfectly legal IPv6 address.

We base our addressing on https://redmine.ungleich.ch/projects/ipv6/wiki/Commonly_used_IPv6_networks - so incoming SIIT based requests are usually found in 2001:db8:a:b00::.

It would be very convenient to write them out as they are instead of needing to do the hex mapping.

ydahhrk commented 3 years ago

in the configuration

Mind being more specific?

Tried:

al@ubuntu20:~$ sudo jool_siit instance add --iptables
al@ubuntu20:~$ sudo jool_siit eamt add 203.0.113.1 2a0a:e5c1:12b:b00::147.78.194.2
al@ubuntu20:~$ sudo jool_siit eamt display
+---------------------------------------------+--------------------+
|                                 IPv6 Prefix |        IPv4 Prefix |
+---------------------------------------------+--------------------+
|            2a0a:e5c1:12b:b00::934e:c202/128 |     203.0.113.1/32 |
+---------------------------------------------+--------------------+
al@ubuntu20:~$ sudo jool_siit instance flush
al@ubuntu20:~$ 
al@ubuntu20:~$ cat git/jool/jool_siit.conf 
{
    "instance": "default",
    "framework": "iptables",

    "eamt": [
        {
            "ipv6 prefix": "2a0a:e5c1:12b:b00::147.78.194.2",
            "ipv4 prefix": "192.0.2.1"
        }
    ]
}
al@ubuntu20:~$ sudo jool_siit file handle git/jool/jool_siit.conf 
al@ubuntu20:~$ sudo jool_siit eamt display
+---------------------------------------------+--------------------+
|                                 IPv6 Prefix |        IPv4 Prefix |
+---------------------------------------------+--------------------+
|            2a0a:e5c1:12b:b00::934e:c202/128 |       192.0.2.1/32 |
+---------------------------------------------+--------------------+

Seems to work fine?

ydahhrk commented 3 years ago
al@ubuntu20:~$ jool_siit --version
4.1.5.0
telmich commented 3 years ago

I stand corrected, 4.1.4 even works already without problems. Sorry for the noise.