tags:

views:

374

answers:

3

Does the net.p2p protocol allow peers to connect over the Internet (through NAT, Firewall, etc).

I understand that PNRP addresses this (thats fine if your using ipV6) but can this also be done when using a custom resolver? ie: when a peer registers in the cloud, does it just get back net.p2p://mypcName/endPoint or does the resolver/PNRP return something that allows the pc to be found behind the firewall?

Im having a really hard time finding good information on .NET's P2P solution - and most of its very old.. does anyone know if this is a viable technology or something that may be gone from .NET soon?

-edit- My Resolver would be publicly accessible, the peers are behind NAT/Firewall.

thanks in advance :-)

+1  A: 

It would be advisable to practice caution here as if you want to host a p2p server behind the firewall. Especially where there is NAT'ing taking place, you need to do port forwarding from the external IP address as per your ISP has given you, and port forward it to your internal network's ip address where your server is.

In .NET Remoting, the big limitation is that it cannot pass through a firewall especially if using NAT. Remoting is fine if it is internal and behind the firewall and that the packets never reach the internet.

You may have to puncture a hole in the firewall to allow the packets in/out and port forward it to your IP address on the internal network. This could bring about a disadvantage that you are more likely to get attacked by malicious hackers who could snoop on the packets flying back and forth across over the internet or even attempt to get into your network.

Hope this helps, Best regards, Tom.

tommieb75
How does Skype (or other chat programs) work? Ie: i know we sign into a central server, but when i send a file to another peer, it creates a direct peer connection. My custom resolver would be publically accessible but the peers are behind NAT's
schmoopy
@Schmoopy: Skype gets around this by using the standard http protocol on port 80 and hence have no problem with the firewall. To confirm in Skype v4.1.1075, click on Tools > Options, Advanced, Connection. Then look at the tab page for this and you will see 'Use port 80/443 as alternatives for incoming connections'.
tommieb75
Thank you tommieb75, makes sense - is there any way to do this with .NET?
schmoopy
@schmoopy: The only way I can think you can get around the firewall issue is to try dotnetremoting.com. I have used genuinechannels.com alright but the company is having internal problems (the main developer left for Microsoft) and is appearing to look iffy. I have not tried dotnetremoting but it seems to look better altogether. Other than that, I am unable to answer this, in short of having to rewrite the entire channel layer using sockets and handle it accordingly which would be costly in terms of time spent.
tommieb75
Thanks tommieb - thats what i feared :-(
schmoopy
+1  A: 

Skype uses UPnP to port forward to itself when sending files or making a call. If that is unavailable then it uses client server mode. Try learning about Nat Traversal and UPnP (I need to as well).

kurtnelle
+3  A: 

It's all documented on MSDN

Use Microsoft's Peer Name Resolution Protocol which used Teredo tunnelling to solve the IP6/IP4 access issue. Or write your own CustomPeerResolverService (which is simple to do)

TFD