[Mono-list] Re: Remoting and firewalls

Robert Jordan robertj at gmx.net
Tue Jun 28 12:00:40 EDT 2005

Helge Lenuweit wrote:

> Hello mono folks,
> I am writing a service that offers a remoted object on either Windows or 
> mono/Linux. While this indeed works great on mono, my solution uses the 
> commercial GenuineChannels product on Windows that offers a 
> bidirectional TcpChannel implementation. This allows to get around 
> firewalls and NAT routers but unfortunately only runs on Windows 
> (offering lots of additional features like security sessions, 
> impersonation, direct exchange etc. which aren't used in my case).. I'm 
> now looking at something similar for mono, or any other solution to "get 
> connected" to the server.

GenuineChannels is sold with source code. Just kick the proprietary

> My research so far brought up the following, most of it from a 
> discussion on this list about two years ago:
> - SSH tunneling to the server might be an option. What I tried was 
> forwarding the server port to my client machine which allowed me to 
> connect to a singleton. Then a method is called and a CAO returned, only 
> that the new object's URI points to the real server's name instead of 
> localhost again. (I used this to allow for an interface-based design).

You have to provide the explicit IP address of the server in its
remoting config file:

   <application name="YourServerName">
       <channel ref="tcp" port="8086"
           bindTo="IP-Address" >

> - Anyway, requiring an SSH connection doesn't seem the most intuitive 
> for the end user... Also I couldn't figure out what to do for the 
> callback channel (I use the "new TcpChannel(0)" constructor for an 
> arbitrary callback port).

Don't use "0". Use a second port that you must forward with SSH as well.


More information about the Mono-list mailing list