https://github.com/firezone/natstat
A simple tool to measure how NATs behave
https://github.com/firezone/natstat
Last synced: about 1 year ago
JSON representation
A simple tool to measure how NATs behave
- Host: GitHub
- URL: https://github.com/firezone/natstat
- Owner: firezone
- License: apache-2.0
- Created: 2023-08-12T21:10:25.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-17T20:22:18.000Z (about 2 years ago)
- Last Synced: 2025-04-11T16:05:52.786Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 16.6 KB
- Stars: 4
- Watchers: 7
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# natstat
A simple tool to measure behavior of your friendly neighborhood NAT device
## What is this
`natstat` records how NAT behaves in a network. This is done by sending packets
from a `client` with source port between `1-65535` through a NAT device, then
recording the observed reflexive source port as seen by a public `server`.
This is done multiple times per source port in order to surface any patterns
that may emerge.
## Running server
Make sure to run the server without any NAT so that source ports are directly
observed.
```
docker compose build server
docker compose up server
```
## Running client
Run the client to send NAT probes to the server. The client should be behind one
or more NATs to observe the reflexive port allocated.
Ensure you run the client with the same magic integer as you provided the
server.
```
docker compose build server
docker compose up client
```
## Client example command
`natstat client -s 10.0.0.72 -d 100.0.0.92:10080 -m 1234`
## Server example command
`natstat server -l 100.0.0.92:10080 -m 1234`
```
```