Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. UDP Hole Punching/STUN tutorials/SDK?

UDP Hole Punching/STUN tutorials/SDK?

Scheduled Pinned Locked Moved C#
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    softwarejaeger
    wrote on last edited by
    #1

    Hello, has somebody a tutorial for UDP Hole Punching or STUN? I have a few problems with the UDP Punching and a few points which i don't understand, maybe somebody could help me: Here an article to UDP Hole Punching: http://www.h-online.com/security/How-Skype-Co-get-round-firewalls--/features/82481\[[^](http://www.h-online.com/security/How-Skype-Co-get-round-firewalls--/features/82481 "New Window")]"> so, UDP Hole Punching works like this, you have 2 clients and one server which knows the IP-Adresses of the clients and their ports over which they would send their UDP Packages (so here's the first problem, from where does the server know, which ports the client use?) first step: Client1 gets the IP-Adress and the Port (see above, here's the problem) of Client 2. second step: CLient1 (IP: 1.1.1.1:1000) sends a package to Client 2 (IP: 2.2.2.2:???? Which port is it?) over UDP, which will be deleted on the NAT-Router of Client 2 (no incoming packages) third step: Client 1 sends the server the information to initiiate a connection to Client 2 over the port 1000 (Client 1) and the Port ???? (Client 2). fourth step: CLient 2 gets the information to create a udp-connection to CLient 1 (IP: 1.1.1.1:1000) over his Port ????. Well, you see the principle is easy, but the Ports of CLient 2 are my big problem, how do i find that out? Has somebody experience in UDP Hole Punching or STUN? Well, what's STUN? I get from a STUN server only my Port, from which i sendet my package to the Server, but another client couldn't do anything with that port and thats the problem how to find out the port of my partner. Many Thansk

    B D C 3 Replies Last reply
    0
    • S softwarejaeger

      Hello, has somebody a tutorial for UDP Hole Punching or STUN? I have a few problems with the UDP Punching and a few points which i don't understand, maybe somebody could help me: Here an article to UDP Hole Punching: http://www.h-online.com/security/How-Skype-Co-get-round-firewalls--/features/82481\[[^](http://www.h-online.com/security/How-Skype-Co-get-round-firewalls--/features/82481 "New Window")]"> so, UDP Hole Punching works like this, you have 2 clients and one server which knows the IP-Adresses of the clients and their ports over which they would send their UDP Packages (so here's the first problem, from where does the server know, which ports the client use?) first step: Client1 gets the IP-Adress and the Port (see above, here's the problem) of Client 2. second step: CLient1 (IP: 1.1.1.1:1000) sends a package to Client 2 (IP: 2.2.2.2:???? Which port is it?) over UDP, which will be deleted on the NAT-Router of Client 2 (no incoming packages) third step: Client 1 sends the server the information to initiiate a connection to Client 2 over the port 1000 (Client 1) and the Port ???? (Client 2). fourth step: CLient 2 gets the information to create a udp-connection to CLient 1 (IP: 1.1.1.1:1000) over his Port ????. Well, you see the principle is easy, but the Ports of CLient 2 are my big problem, how do i find that out? Has somebody experience in UDP Hole Punching or STUN? Well, what's STUN? I get from a STUN server only my Port, from which i sendet my package to the Server, but another client couldn't do anything with that port and thats the problem how to find out the port of my partner. Many Thansk

      B Offline
      B Offline
      bewithram
      wrote on last edited by
      #2

      Hi, I am also trying to figure out the solution for the same problem. Does anyone have the answer?

      1 Reply Last reply
      0
      • S softwarejaeger

        Hello, has somebody a tutorial for UDP Hole Punching or STUN? I have a few problems with the UDP Punching and a few points which i don't understand, maybe somebody could help me: Here an article to UDP Hole Punching: http://www.h-online.com/security/How-Skype-Co-get-round-firewalls--/features/82481\[[^](http://www.h-online.com/security/How-Skype-Co-get-round-firewalls--/features/82481 "New Window")]"> so, UDP Hole Punching works like this, you have 2 clients and one server which knows the IP-Adresses of the clients and their ports over which they would send their UDP Packages (so here's the first problem, from where does the server know, which ports the client use?) first step: Client1 gets the IP-Adress and the Port (see above, here's the problem) of Client 2. second step: CLient1 (IP: 1.1.1.1:1000) sends a package to Client 2 (IP: 2.2.2.2:???? Which port is it?) over UDP, which will be deleted on the NAT-Router of Client 2 (no incoming packages) third step: Client 1 sends the server the information to initiiate a connection to Client 2 over the port 1000 (Client 1) and the Port ???? (Client 2). fourth step: CLient 2 gets the information to create a udp-connection to CLient 1 (IP: 1.1.1.1:1000) over his Port ????. Well, you see the principle is easy, but the Ports of CLient 2 are my big problem, how do i find that out? Has somebody experience in UDP Hole Punching or STUN? Well, what's STUN? I get from a STUN server only my Port, from which i sendet my package to the Server, but another client couldn't do anything with that port and thats the problem how to find out the port of my partner. Many Thansk

        D Offline
        D Offline
        digichetan
        wrote on last edited by
        #3

        I guess, this is how it should be done 1. You get back your mapped port and mapped address from the STUN 2. CLient2 also gets back its mapped port and mapped address from the STUN 3. The STUN server should store these info. When either clients want to communicate with the other, it sends a request to the STUN server. The Stun server then sends a message to both the clients with the mapped Addr and port of their counterpart. 4. After this, hole punching can be done by the method shown in the article above.

        C 1 Reply Last reply
        0
        • D digichetan

          I guess, this is how it should be done 1. You get back your mapped port and mapped address from the STUN 2. CLient2 also gets back its mapped port and mapped address from the STUN 3. The STUN server should store these info. When either clients want to communicate with the other, it sends a request to the STUN server. The Stun server then sends a message to both the clients with the mapped Addr and port of their counterpart. 4. After this, hole punching can be done by the method shown in the article above.

          C Offline
          C Offline
          Cosby
          wrote on last edited by
          #4

          Hi guys, i'm interesting at this. have you found some examples or howto?? How do you solve this problems??

          1 Reply Last reply
          0
          • S softwarejaeger

            Hello, has somebody a tutorial for UDP Hole Punching or STUN? I have a few problems with the UDP Punching and a few points which i don't understand, maybe somebody could help me: Here an article to UDP Hole Punching: http://www.h-online.com/security/How-Skype-Co-get-round-firewalls--/features/82481\[[^](http://www.h-online.com/security/How-Skype-Co-get-round-firewalls--/features/82481 "New Window")]"> so, UDP Hole Punching works like this, you have 2 clients and one server which knows the IP-Adresses of the clients and their ports over which they would send their UDP Packages (so here's the first problem, from where does the server know, which ports the client use?) first step: Client1 gets the IP-Adress and the Port (see above, here's the problem) of Client 2. second step: CLient1 (IP: 1.1.1.1:1000) sends a package to Client 2 (IP: 2.2.2.2:???? Which port is it?) over UDP, which will be deleted on the NAT-Router of Client 2 (no incoming packages) third step: Client 1 sends the server the information to initiiate a connection to Client 2 over the port 1000 (Client 1) and the Port ???? (Client 2). fourth step: CLient 2 gets the information to create a udp-connection to CLient 1 (IP: 1.1.1.1:1000) over his Port ????. Well, you see the principle is easy, but the Ports of CLient 2 are my big problem, how do i find that out? Has somebody experience in UDP Hole Punching or STUN? Well, what's STUN? I get from a STUN server only my Port, from which i sendet my package to the Server, but another client couldn't do anything with that port and thats the problem how to find out the port of my partner. Many Thansk

            C Offline
            C Offline
            Cosby
            wrote on last edited by
            #5

            Hi guys, i'm interesting at this. have you found some examples or howto?? How do you solve this problems?? PLEASE HELP ME

            S 1 Reply Last reply
            0
            • C Cosby

              Hi guys, i'm interesting at this. have you found some examples or howto?? How do you solve this problems?? PLEASE HELP ME

              S Offline
              S Offline
              srdusad
              wrote on last edited by
              #6

              hi guys if anybody found any solution regarding NAT traversal , please email me at : sanjudusad@gmail.com Thanks in advance :sigh:

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups