Various algorithms for bijective mapping of internal addresses to external (address, port list) pairs, with the intent of enabling deterministic NAT, so eliminating the need to log individual translations.
Ports are allocated in contiguous blocks.
Ports are allocated in non-contiguous blocks, those associated with a given internal address separated by a constant stripe size.
Ports are allocated in non-contiguous blocks, scrambled with a simplistic RSA-like cryptographic algorithm.
These algorithms were developed independently, and prior to the publication of RFC 7422, though similarity is pleasantly uncanny. Production-worthy implementations welcomed.
usage: crunchnat.py [-h] [-a {simple,stripe,secure}]
external/net internal/net {validate,forward,reverse} ...
Deterministic forward and reverse address translation through the CrunchNAT
algorithm
positional arguments:
external/net external or public network
internal/net internal or private network
{validate,forward,reverse}
validate validate algorithm with provided external/internal
networks
forward map internal address to external address: [port list]
reverse map external address:port to internal address
optional arguments:
-h, --help show this help message and exit
-a {simple,stripe,secure}, --algo {simple,stripe,secure}
algorithm