Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 142
  • Last Modified:

How does the STUN server helps discover the device public ip address

HI,
Here is my understanding of STUN.
Device A which is behind NAT wants to discover its public ip address so sends a request to STUN server.

A->B->C->D (public ip) -> E->F->G->STUN server
So the request flows till D which is last router having private ip address with a WAN facing public ip address.
When one says about discovering its public ip address i think this ip of Device D is what we are talking about.
Now the request flow through several machines on internet E , F and G and finally lands on the public STUN server.

what i understand is the Packet that stun server recieves will only have info that it came from G ??
So as per that how does STUN server knows that it has to send the public ip (of D) in the response ?

Please clarify. I know my understanding has gaps somewhere....

Thanks
0
Rohit Bajaj
Asked:
Rohit Bajaj
  • 3
2 Solutions
 
John HurstBusiness Consultant (Owner)Commented:
A STUN sever is used primarily for VOIP, otherwise it is not generally needed or used.
0
 
Rohit BajajAuthor Commented:
Hi,
But i guess its main use there also will be to find out the public ip address of the host.
So my question basically is how does the public ip of the host reaches the STUN.
Where is this public ip stored in the packet transfer ?

Even if it was not  STUN server  but some other public server say X. Will then also X will know the public ip of host ?
0
 
John HurstBusiness Consultant (Owner)Commented:
I have never seen a STUN on any local machine (think also of all my clients).

The TCP/IP packet contains the IP information about Target and Host.   This is what TCP/IP does.

Run Wireshark (I use CommView) to look at packets and what they contain.
0
 
John HurstBusiness Consultant (Owner)Commented:
@Rohit Bajaj - A STUN server is not used everywhere and has application where I suggested. Do you need more information to close this question
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now