fcnatfw/README.md
2026-01-25 06:04:13 +05:00

20 lines
891 B
Markdown

# fcnatfw
standalone NAT traversal / automatic port forwarding tool.
components:
- bin/fcnatfw - attempts to create and maintains a globally accessible port
mapping using repeated STUN pings and UPnP, prints external address on stdout
- bin/fcnatwrap - overloads C library socket functions to force SO_REUSEPORT
## usage example
step -1: install ping, [stunclient from stuntman](https://github.com/jselbie/stunserver), miniupnpc, nmap's ncat
step 0. compile the evil shared library in lib/ using lib/build.sh (after cd'ing into lib)
step 1. forward port 1234: `fcnatfw 1234 tcp` (keep this running)
step 2. run ncat under fcnatwrap so it can share the port with fcnatfw: `fcnatwrap ncat -k -l -c 'echo Meow!' 1234`
step 3. share ip:port printed by fcnatfw with others to connect
this only works if all NATs in your path either are Full Cone, or support UPnP port forwarding.