Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4343578
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:46:24+00:00 2026-05-21T11:46:24+00:00

I am trying to make a peer 2 peer audio/video application, but behind NAT

  • 0

I am trying to make a peer 2 peer audio/video application, but behind NAT and behind firewall causing my application failture, i figure out that Skype does it and other application does also other approach, then i decided to use this approach which will allow my application to work behind NAT office/home.

UDP Hole punching:

So far, tried hping2 and netcat. Server, pc1 behind nat/firewall and pc2 behind nat/firewall

local/1$ nc -u 14141 -l  # ME, step 1
remoteServer$ echo "hello" | nc -p 53 -u xx.23.xx.xx 14141  # My server, to say hello 
nc: Write error: No route to host    
local/2$ hping2 -c 1 -2 -s 14141 -p 53 xx.21.xx.xx # Me from second terminal making a hole
remoteServer$ echo "hello" | nc -p 53 -u xx.23.xx.xx 14141 # My server again say hell
local/1 $ nc -u 14141 -l # ME, step 1 was running and it received "hello" now
 hello

But local/1 how to get the hello, without hping2 or what is exactly hping2?
Can anyone suggest? Or how i can just do the A (local) B(server) C(my friend) communicate with peer 2 peer using this method?

Useful links:
http://www.masquerade.cz/en/nat-tunel-metodou-udp-hole-punching-v-jazyce-java/

Follow up:
UPnP is best solution? But it looks for the very next hop, so in that case it will fail for this road map (if i am not wrong):

Me (behind NAT) -> MyOffice (with router, 50 laptops) -> ISP1 -> ISP2 -> FriendOffice (router, 90 laptops) -> Friend (behind NAT)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:46:25+00:00Added an answer on May 21, 2026 at 11:46 am

    What many p2p applications do is to connect to the nearest router and ask them to open a port to themselves. Read about UPnP and NAT-PMP protocols.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a change to an old appengine application, but now after
I am trying make a segue call in a tableview , but the application
I'm trying make an WPF application that I could copy/cut and paste files info
I'm trying make an entity with doctrine that has three associations with other entities
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
Trying to make a small countdown timer in my app but it's not working.
im trying make one replace in string from a array but this dont work
trying to make 5 curl childs for curl handler and defining them, but can't
I'm trying make one treeView with infinite subgroups. I can add my groups but
Trying to make simple jQuery function to create a scrollToTop button that fades in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.