-
Notifications
You must be signed in to change notification settings - Fork 350
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
If I use the external IP the binding test fails : What am I doing wrongly? How to correctly obtain Mapped Address from Stunman Server? #41
Comments
If I read this correctly, your server is behind a NAT, which is fine. But
you are using your client to connect to your local server via the external
IP address. This means that your NAT needs to support a mode called
hairpinning <https://en.wikipedia.org/wiki/Hairpinning>. Not all NATs
support this mode that enables clients behind the NAT to hit another node
behind the same NAT via the external IP.
You could try port forwarding from port 3478 to your 192.168.1.7 address.
That might enable hairpinning to work.
It's rather unusual for an actual P2P or RTC session to rely on a
stunserver running on the same device as the client. Most servers run on
the public internet.
…On Thu, Jul 22, 2021 at 5:26 AM raphael10-collab ***@***.***> wrote:
I compiled in Ubuntu 20.04 stunserver.
Now I'm trying to understand how to make it properly work.
If I use the IP of the local network, then the binding test succeed.
(base) ***@***.***:~/stunserver$ ./stunclient --mode behavior 192.168.1.7 --verbosity 9
Resolved 192.168.1.7 to 192.168.1.7:0
config.fBehaviorTest = true
config.fFilteringTest = false
config.timeoutSeconds = 0
config.uMaxAttempts = 0
config.addrServer = 192.168.1.7:3478
socketconfig.addrLocal = 0.0.0.0:0
Sending message to 192.168.1.7:3478
Got response (56 bytes) from 192.168.1.7:3478 on interface 192.168.1.7:38521
Binding test: success
Local address: 192.168.1.7:38521
Mapped address: 192.168.1.7:38521
Behavior test: success
Nat behavior: Direct Mapping
If I use the external IP , then the binding test fails :
(base) ***@***.***:~/stunserver$ ./stunclient --mode behavior 109.116.136.120 --verbosity 9
Resolved 109.116.136.120 to 109.116.136.120:0
config.fBehaviorTest = true
config.fFilteringTest = false
config.timeoutSeconds = 0
config.uMaxAttempts = 0
config.addrServer = 109.116.136.120:3478
socketconfig.addrLocal = 0.0.0.0:0
Sending message to 109.116.136.120:3478
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Sending message to 109.116.136.120:3478
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Continuing to wait for response...
Binding test: fail
Behavior test: fail
What am I doing wrongly? How to correctly obtain Mapped Address from
Stunman Server?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#41>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHNSF4NFO2R3USHZASWD6TTZAFAZANCNFSM5AZ42GCQ>
.
|
Hi @jselbie ! Thank you for your kind prompt reply and interesting explanation. Actually, what I'm trying to do, is to "simulate" and "emulate" in a local environment, what I will then deploy in a larger mixed, local + cloud, environment.
If I "call" from the outer system the contained stunserver I do not get any errors :
Does this sound correct to you, or am I making things more complicated than they could be, keeping in mind that my objective is to emulate and simulate locally what I will deploy in a broader environment? |
This is one of those things where I would really need to see a complete picture or diagram of your network topology before I could give a correct answer. It might be a simple command line switch or network configuration change. But it's rather unusual what you are doing. What are you really trying to do? |
I sketched a representation of the network I have in mind. Doing it, I actually realized that trying to simulate locally what it is not by its nature, is not that clever and even possible. So, even if I'm departing from my original issue's subject, I ask you: based on your experience, how would you test, may be using cloud services providers (AWS, Azure,...) this kind of network topology? |
I compiled in Ubuntu 20.04 stunserver.
Now I'm trying to understand how to make it properly work.
If I use the IP of the local network, then the binding test succeed.
If I use the external IP , then the binding test fails :
What am I doing wrongly? How to correctly obtain Mapped Address from Stunman Server?
The text was updated successfully, but these errors were encountered: