[dba-VB] WCF Peer to Peer application(s) communicating over Internet through NATs and firewalls?

Gustav Brock gustav at cactus.dk
Sat Mar 15 10:05:44 CDT 2014

Hi Shamil

Haven't studied you comprehensive list of links ... but your issue seems to be the same as remote control applications have facing corporate firewalls. Just about the only port open for corporate users is port 80, so the host program "pings" regularly a central server where it is, and the server replies using a dynamic port. When a remote viewer wishes to connect to the host, it calls the server to look it up and gets the dynamic port which then is used for (encrypted) communication, effectively "crossing" the firewalls.

You can study this with Remote Utilities (free for one account and 10 hosts):


Contrary to most other remote utilities, this offers for free the central server application which you can install on a simple workstation on premise, thus you will be able to monitor all trafic.

Remote Utilities has the special feature that it can even establish a normal Remote Desktop connection which normally runs on port 3389 (or some other port which you can specify in the Registry) which no notwork admin will open for you in a firewall as it can be scanned by hostile port scanners, except if you have a VPN connection and this will also be of the mercy of the notwork admin. However, Remote Utilities offsets the connection to a dynamic port above port 40000 which is displayed when you call this feature; I guess the Remote Utilities host application performs the NAT'ing of the packets. It's quite fun to watch this magic.


Fra: dba-vb-bounces at databaseadvisors.com <dba-vb-bounces at databaseadvisors.com> på vegne af Salakhetdinov Shamil <mcp2004 at mail.ru>
Sendt: 13. marts 2014 22:13
Til: Discussion concerning Visual Basic and related programming issues.
Emne: [dba-VB] WCF Peer to Peer application(s) communicating over Internet through NATs and firewalls?

Hi All --

Do you have any working experience in developing subject type of applications in C#/VB.NET or any working samples(/samples' links) of the subject type of applications?
The subj happens to be rather tricky to implement - here is just a set of docs to investigate for starters:
Working with NATs and Firewalls
Teredo Overview
Peer-to-Peer Networking
http://msdn.microsoft.com/en-us/library/ms733761 (v=vs.110).aspx
Peer Resolvers
http://msdn.microsoft.com/en-us/library/aa702771 (v=vs.110).aspx
Net.TCP Port Sharing
http://msdn.microsoft.com/en-us/library/ms734772 (v=vs.110).aspx
Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4
NetPeerTcpBinding Class - !depreciated
Unsupported / Mesh.NET is a free Peer-To-Peer .NET framework

A Common Language for the Internet of Everything
Thank you.

Салахетдинов Шамиль
dba-VB mailing list
dba-VB at databaseadvisors.com

More information about the dba-VB mailing list