NICMx / Jool

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

Infeasible configuration on the document #388

Closed yuuzi41 closed 1 year ago

yuuzi41 commented 1 year ago

"Atomic Configuration" ( https://nicmx.github.io/Jool/en/config-atomic.html#nat64 ) shows the example configuration for NAT64, but actually it is not feasible.

This configuration contains a BIB for TCP port 80 as following:

  {
      "protocol": "TCP",
      "ipv6 address": "2001:db8::1#80",
      "ipv4 address": "192.0.2.1#80"
  }, {

but the configuration of pool4 contains an entry for TCP having only 61001-62000 port ranges.

  {
      "comment": "mark, port range and max-iterations are optional.",
      "protocol": "TCP",
      "prefix": "192.0.2.1/32"
  }, {

Jool requires that incoming IPv4 packets must match any pool4 entries. https://github.com/NICMx/Jool/blob/master/src/mod/common/steps/filtering_and_updating.c#L526

Therefore the BIB mentioned above is not workable and that's why I think the configuration is not feasible.

ydahhrk commented 1 year ago

Thank you very much.

I uploaded an additional commit to validate this properly during the atomic configuration handler. I'm going to wait for a release because there might be a reason why this validation didn't exist before, but nothing comes to mind right now.