-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just a question #6
Comments
In my own opinion, it is not possible to punch hole the way you are suggesting. As I know stun is based on UDP. My approach is based on UDP too. Theoretically, it is possible to drill TCP hole through NATs, but you have to control low level TCP handshake to do this. Browsers unable to deal with UDP and, of cause, they disallow you to control TCP handshake. However, I heard, that WebRTC is good in NAT traversal. Maybe it will help you? |
Webrtc can somewhat help but bot the best solution. We can do that in several ways.
|
Well, let's won't consider the way 2. I really didn't grasp your way 1. You want to raise http server on localhost and literally "redirect all the traffic from another port to that port", what the that port do you mean? It must be not your local port, but external NAT port with already established TCP connection. |
I mean similar to ssh port forwarding (tunneling) |
It would be possible, If ssh was able to use UDP as transport. However it don't. This is the reason why I use openvpn to establish TCP connection over UDP transport. |
@michurin |
As I understand, the transport is UDP anyway. It works like that:
Moreover, to "establish" UDP connection, pwnat makes tricks with ICMP. All that protocols (UDP, ICMP) are unreachable for browsers. |
Maybe it's not related but I try.
I want to use the same nat punching method to access web server behind nat but from the browser
Something like that:
client behind nat (for instance, my android phone) request to visit some webpage behind nat (let's say ssh server on my local network) from the stun server over http request in browser
eg -
http://some.helpful.stun.server/?url=http://my.target.ip.behind.nat
the target ip should be always in contact with the stun server
when the stun server get's the client request, it connects him (simply redirect) to the punched ip:port behind nat.
is that possible?
The text was updated successfully, but these errors were encountered: