Skip to content

ewpratten/protomask

Repository files navigation

protomask: Fast & reliable user space NAT64

GitHub release Build Audit

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 crates.io
protomask-clat User space Customer-side transLATor (CLAT) implementation crates.io
easy-tun A pure-rust TUN interface library crates.io docs.rs
fast-nat An OSI layer 3 Network Address Table built for speed crates.io docs.rs
interproto Utilities for translating packets between IPv4 and IPv6 crates.io docs.rs
rfc6052 A Rust implementation of RFC6052 crates.io docs.rs
rtnl Slightly sane wrapper around rtnetlink crates.io docs.rs

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.