-2

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 ?

2 Answers2

1

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.

JohnThePro
  • 2,595
  • 14
  • 23
1

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.

Massimo
  • 70,200
  • 57
  • 200
  • 323