-
Notifications
You must be signed in to change notification settings - Fork 319
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
Support hairpinning routing with TURN server #82
Comments
You could imply fix add this loopback nat capability using iptables. Just DNAT your own public IP to your internal IP. And for two different servers behind the same public IP you could just DNAT the public ip to the private internal ip on each instance using iptables. |
@agowa338 Use of iptables sounds like a good idea. But the |
Summary
I deployed coturn server on AWS EC2, using -X option to assign a public (elastic) IP address so that allocated relayed transport address is routable.
If I use
ICETransportPolicyRelay
(use relay only), two pion nodes wouldn't connect with each other. The reason is, and I am pretty sure, the 1:1 private/public port mapper AWS provides (configured via security group) does not route packets between the ports on the same public IP address - so called, the hairpinning routing, is not supported.It would be great if pion/turn server support, in addition to #56, this hairpinning routing (the green line below) which coturn does not even offer. (I reviewed its config 100 times...)
Motivation
I believe, as long as UDP get through your local NAT/Firewall, then a relay-to-relay candidate wouldn't be necessary in most cases. Also, if many TURN servers are deployed, then the chances of two endpoints using the same instance of TURN server would be low.
But, if:
Support of the hairpinning behavior would be crucial.
(also, support of it is not expensive)
Describe alternatives you've considered
Add two relay candidates, maybe?
As we only support UDP right now. This is a low priority, I'd say.
The text was updated successfully, but these errors were encountered: