Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have two machines A and B:

A: Client (behind NAT)

B: Server (behind NAT)

I want 'B' to be able to listen on port 8080 for example, so that 'A' can send packets to 'B' through that specific @ip:8080..already Skype, MSN works without prior configuration...

Any suggestion ?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Those applications 'poke holes' in the firewall by sending out packets, usually UDP, to open holes in the firewall. Most firewalls/routers will open ports for traffic if the traffic is initiated from behind the firewall.

That's how Skype works (minus proprietary encryption): You install it, and it automatically pokes a random hole in the firewall to connect to another node, Once that connection is established, it records that port number as active for this session, and that's that.

PS - Are you trying to develop an application? StackOverflow.

share|improve this answer
    
Thanks, i have googgled i found this en.wikipedia.org/wiki/Hole_punching –  Smarty Twiti Apr 30 '12 at 22:52

In order to do that, you need either:

  • B's network admin to implement a port forwarding rule on B's firewall, or
  • Another server C sitting outside both NATs, which can listen for incoming connections on a public IP address and act as a gateway between the two of them.

If both endpoints are behind their respective NATs, no admin is willing to port-forward anything and there isn't any outside server willing to bridge the gap, I'm afraid you are quite out of options.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.