{{Header}}
{{#seo:
|description=todo
}}
{{intro|
todo
}}
{{stub}}
= pwnat =
{{Unsupported}}
* https://samy.pl/pwnat
* https://github.com/samyk/pwnat
To make the client’s browser access
(port 80
) and get your HTTP server behind NAT, here’s the correct setup:
On Your Server (behind NAT, running the HTTP service on port 8080
):
{{CodeSelect|code=
sudo ./pwnat -s 0.0.0.0 2222 127.0.0.1:8080
}}
This:
* Listens for pwnat
clients on UDP port 2222
* Only allows proxy access to your local port 8080
(your HTTP server)
Make sure your HTTP server is running:
{{CodeSelect|code=
python3 -m http.server 8080
}}
On the Client (behind another NAT, allows browser to connect):
Note: Replace your.server.public.ip
with the actual IP address of your server.
{{CodeSelect|code=
sudo ./pwnat -c 0.0.0.0 80 your.server.public.ip 2222 127.0.0.1 8080
}}
This:
* Binds to port 80
on the client (accessible via
)
* Proxies requests through your server’s pwnat
to its local 8080
* Now, on the client machine, just open:
{{CodeSelect|code=
http://127.0.0.1
}}
Expected result:
Client should see the server’s content.
== Actual Result ==
client:
Listening on TCP 0.0.0.0:80Then nothing happening. server:
Listening on UDP 0.0.0.0:2222Then nothing happening. Setup: * server: ISP home router -> notebook -> Qubes -> VM (with direct internet connection) * client test 1: ISP home router -> notebook -> Qubes -> different VM (with direct internet connection) * client test 1: ISP home router -> notebook -> Qubes -> different VM (with VPN connection) Functionality tests: * HTTP server is functional locally on the server: Yes. Command
curl 127.0.0.1:8080
shows HTML output.
* Behind normal NAT according to https://tomchen.github.io/symmetric-nat-test/. (Not behind symmetric NAT.)
* server internet functionality test (visit any website): yes
* client test 1 internet functionality test (visit any website): yes
* client test 2 internet functionality test (visit any website): yes
== Debian ==
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930966
= See Also =
* https://tomchen.github.io/symmetric-nat-test/
* GNUnet's Probabilistic NAT Traversal
* libp2p
** https://libp2p.io/
* slipstream
** https://samy.pl/slipstream/
** https://github.com/samyk/slipstream
{{Footer}}
[[Category:Documentation]]