4 releases (2 stable)
1.1.0 | Apr 24, 2024 |
---|---|
1.0.0 | Feb 12, 2024 |
0.2.0 | Jul 20, 2023 |
0.1.0 | Jul 17, 2023 |
#462 in Network programming
247 downloads per month
130KB
2K
SLoC
protomask
: Fast & reliable user space NAT64
The protomask tool suite is a collection of user space tools that translate packets between OSI layer 3 protocol versions
This repository (referred to as the protomask tool suite) contains the following sub-projects:
Crate | Info | Latest Version |
protomask |
User space NAT64 implementation | |
protomask-clat |
User space Customer-side transLATor (CLAT) implementation | |
easy-tun |
A pure-rust TUN interface library | |
fast-nat |
An OSI layer 3 Network Address Table built for speed | |
interproto |
Utilities for translating packets between IPv4 and IPv6 | |
rfc6052 |
A Rust implementation of RFC6052 | |
rtnl |
Slightly sane wrapper around rtnetlink |
Installation
Protomask can be installed using various methods:
Debian
Head over to the releases page and download the latest release for your architecture.
Then, install with:
apt install /path/to/protomask_<version>_<arch>.deb
# You can also edit the config file in /etc/protomask.json
# And once ready, start protomask with
systemctl start protomask
Using Cargo
cargo install protomask
Usage
The protomask
and protomask-clat
binaries are mostly self-sufficient.
Nat64
To start up a NAT64 server on the Well-Known Prefix (WKP), run:
protomask --pool-prefix <prefix>
Where <prefix>
is some block of addresses that are routed to the machine running protomask.
For more information, run protomask --help
. Configuration may also be supplied via a JSON file. See the example config for more information.
CLAT
To start up a CLAT server on the Well-Known Prefix (WKP), run:
protomask-clat --customer-prefix <prefix>
Where <prefix>
is some block of addresses that are routed to the machine running protomask. This would generally be the address range of a home network when run on CPE. It may also be an individual client address if run on a client device instead of a router.
For more information, run protomask-clat --help
. Configuration may also be supplied via a JSON file. See the example config for more information.
Dependencies
~14–25MB
~380K SLoC