fix compat with py3
[rofl0r-nat-tunnel.git] / README.md
blobc9d5bb1666b921a9b92c4f003b63acf6a3737640
1 NAT Tunnel v0.01
2 ----------------
3 If you have access to a server with public IP and unfiltered ports
4 you can run NAT Tunnel (NT)  server on the server, and NT client
5 on your box behind NAT.
6 the server requires 2 open ports: one for communication with the
7 NT client (--admin), the other for regular clients to connect to
8 (--public: this is the port you want your users to use).
10 The NT client opens a connection to the server's admin ip/port.
11 As soon as the server receives a new connection, it signals the
12 NT client, which then creates a new tunnel connection to the
13 server, which is then connected to the desired service on the
14 NT client's side (--local)
16 The connection between NT Client and NT Server on the admin
17 interface is protected by a shared secret against unauthorized use.
18 An adversary who can intercept packets could crack the secret
19 if it's of insufficient complexity. At least 10 random
20 characters and numbers are recommended.
22 Example:
23 You have a HTTP server listening on your local machine on port 80.
24 You want to make it available on your cloud server/VPS/etc's public
25 IP on port 7000.
26 We use port 8000 on the cloud server for the control channel.
28 Server:
30     natsrv.py --mode server --secret s3cretP4ss --public 0.0.0.0:7000 --admin 0.0.0.0:8000
32 Client:
34     natsrv.py --mode client --secret s3cretP4ss --local localhost:80 --admin example.com:8000