Scroll to navigation

jool(8) NAT64 Jool's Userspace Client jool(8)


jool - Interact with NAT64 Jool (the kernel module).


Sends commands and requests to NAT64 Jool.
NAT64 Jool is a kernel module you load into a Linux kernel. It implements RFC 6146.


Linux is the only OS in which this program makes sense.
Kernels 4.9 and up.


jool [<argp1>] instance (
| add
(--netfilter | --iptables)
--pool6 <IPv6-prefix>
| remove
| flush
| <help>

jool [<argp1>] stats (
| <help>

jool [<argp1>] global (
| update
<Key> <Value>
| <help>

jool [<argp1>] pool4 (
[--tcp | --udp | --icmp]
| add
<IPv4-Address> <Ports>
[--tcp | --udp | --icmp]
[--mark <Mark>]
[--max-iterations (auto | infinity | <Iterations>)]
| remove
<IPv4-Address> <Ports>
[--tcp | --udp | --icmp]
[--mark <Mark>]
| flush
| <help>

jool [<argp1>] bib (
[--tcp | --udp | --icmp]
| add
[--tcp | --udp | --icmp]
| remove
[--tcp | --udp | --icmp]
| <help>

jool [<argp1>] session (
[--tcp | --udp | --icmp]
| <help>

jool [<argp1>] file (
handle <JSON-File>
| <help>

<argp1> := (<help> | --instance <Name> | --file <File>)

<help> := (--help | --usage | --version)


Modes and Operations

Show all instances from all namespaces.
Create a new instance.
Drop an existing instance.
Drop all instances from the current namespace.
Show internal counters.
Show the current values of the instance's tweakable internal variables.
Tweak one of the instance's internal variables.
Show one of the tables from the IPv4 transport address pool.
(Each protocol has one table.)
Upload an entry to the IPv4 transport address pool.
Drop transport addresses from the IPv4 transport address pool.
Empty the IPv4 transport address pool.
Show one of the BIB tables.
(Each protocol has one table.)
Add a static entry to the BIB.
Remove an entry (static or otherwise) from the BIB.
Show one of the the session tables.
(Each protocol has one table.)
Parse all the configuration from a JSON file.
Create instance if it doesn't exist, update if it does.


Name of the instance you want to interact with.
It's an ASCII string, 15 characters max. Defaults to 'default'.
JSON file which contains the name of the instance you want to interact with.
Same JSON structure as the one from atomic configuration.
Apply the operation on the TCP table.
(This is the default table.)
Apply the operation on the UDP table.
Apply the operation on the ICMP table.
Output in CSV table format.
Do not print table headers. (Nor footer, if applies.)
Sit the instance on top of the Netfilter framework.
Sit the instance on top of the iptables framework.
Contents of the new instance's IPv6 pool.
Show all the counters.
(Otherwise, only the nonzero ones are printed.)
Show a description of each counter.
The pool4 entry will only be allowed to mask packets carrying this mark.
It's a 32-bit unsigned integer. Defaults to zero.
Maximum number of times the mask-finding algorithm will be allowed to iterate.
auto computes a recommended default,
infinity removes the iteration cap,
<Iterations> (unsigned 32-bit integer) sets the actual number.
Apply operation even if certain validations fail.
Do not remove orphaned BIB and session entries.
Do not query the DNS.

Other Arguments

<Key> <Value>
Name of the variable you want to edit (see 'Globals' section), and its new value.
<IPv4-Address> <Ports>
Descriptor of the range of transport addresses you want to add or remove from the pool.
<Ports> is a range of ports; it should follow the format '<Min>[-<Max>]'.
The command will add or remove addresses <IPv4-Address>#<Min> to <IPv4-Address>#<Max>.
<IPv6-transport-address>, <IPv4-transport-address>
Transport addresses that shape the BIB entry you want to add or remove.
The format is 'IPV6_ADDRESS#PORT' and 'IPV4_ADDRESS#PORT', respectively.
Name of the instance you want to add or remove.
If --instance or --file were included in <argp1>, then the instance names must match.
Path to a JSON file.


Enable or disable the instance.
The IPv6 pool's prefix.
Smallest reachable IPv6 MTU.
Enable logging of debug messages?
Always set the IPv6 header's 'Traffic Class' field as zero?
Otherwise copy from IPv4 header's 'TOS'.
Override the IPv4 header's 'TOS' field as --tos?
Otherwise copy from IPv6 header's 'Traffic Class'.
Value to override TOS as (only when override-tos is ON)
Set the list of plateaus for ICMPv4 Fragmentation Neededs with MTU unset.
Behave as (address-)restricted-cone NAT?
Otherwise behave as full-cone NAT.
Filter ICMPv6 Informational packets?
Drop externally initiated TCP connections?
Set the TCP established session lifetime.
Set the TCP transitory session lifetime.
Set the UDP session lifetime.
Set the ICMP session lifetime.
Set the maximum allowable 'simultaneous' Simultaneos Opens of TCP connections.
Translate source addresses directly on 4-to-6 ICMP errors?
Defines the arguments that will be sent to F().
(F() is defined by algorithm 3 of RFC 6056.)
- First (leftmost) bit is source address.
- Second bit is source port.
- Third bit is destination address.
- Fourth (rightmost) bit is destination port.
Use transitory timer when RST is received during the V6 FIN RCV or V4 FIN RCV states?
Log BIBs as they are created and destroyed?
Log sessions as they are created and destroyed?
Log basic packet fields as they are received?
Enable Session Synchronization?
Try to synchronize sessions as soon as possible?
Inactive milliseconds after which to force a session sync.
Maximim number of queuable entries.
Maximum amount of bytes joold should send per packet.


Create a new instance named "Example":
jool instance add Example --iptables --pool6 64:ff9b::/96

Add addresses to to the IPv4/TCP pool:
jool -i Example pool4 add 1024-2048 --tcp

Print the TCP table of the BIB:
jool -i Example bib display

Add an UDP binding to the BIB:
jool -i Example bib add 1::1#2000 --tcp

Remove the binding from the BIB:
jool -i Example bib remove --tcp

Print the TCP session table:
jool -i Example session display

Print the global configuration values:
jool -i Example global display

Update some global configuration value:
jool -i Example global update address-dependent-filtering ON


TRUE, FALSE, 1, 0, YES, NO, ON and OFF are all valid booleans. You can mix case too.


Zero on success, non-zero on failure.


NIC Mexico & ITESM


Our issue tracker is If you want to mail us instead, use


Copyright 2023 NIC Mexico.
License: GPLv2 (GNU GPL version 2)
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


2023-01-25 v4.1.9