-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
If a program uses a source port that falls into jool's configured NAT64 port range, connections will fail / hang / never work.
Example:
apu9:/etc/jool# cat jool.conf
{
"comment": "NAT64",
"instance": "default",
"framework": "netfilter",
"global": {
"comment": "pool6 prefix",
"pool6": "2a0a:5480:1ac:c001::/96"
},
"comment": "IPv4 pool4 table",
"pool4": [
{
"protocol": "TCP",
"prefix": "185.169.241.66",
"port range": "40001-65535"
}, {
"protocol": "UDP",
"prefix": "185.169.241.66",
"port range": "40001-65535"
}, {
"protocol": "ICMP",
"prefix": "185.169.241.66",
"port range": "40001-65535"
}
]
Assume then a program uses source port = 60001, the connection will fail. The following example demonstrates this:
apu9:~# curl -I https://registry.k8s.io/v2/
curl: (28) Failed to connect to registry.k8s.io port 443 after 133128 ms: Could not connect to server
## stopping jool here -->
apu9:~# curl -I https://registry.k8s.io/v2/
HTTP/2 200
docker-distribution-api-version: registry/2.0
date: Sat, 23 Aug 2025 15:24:46 GMT
content-type: text/html
server: Google Frontend
via: 1.1 google
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
## it works. Starting jool again, it fails:
apu9:~# curl -I https://registry.k8s.io/v2/
curl: (28) Failed to connect to registry.k8s.io port 443 after 133697 ms: Could not connect to server
apu9:~#
I've added a pcap showing the exact behaviour.
This can probably be avoided by configuring Linux to not use the same port range as the one jool uses, but it should probably be documented.
Metadata
Metadata
Assignees
Labels
No labels