NAT and TCP Sockets

brentnewbury

Member
Joined
Oct 27, 2004
Messages
15
Location
Nottingham, UK
Hiya all,

Im trying to create a sample Peer 2 Peer chat application. However, Im having trouble with Network Address Translation (NAT). Programs like MSN/Windows Messenger use NAT (I know they arent coded in C# :)). However, when Im sending or listening for information Im using TCP Listeners and Clients. The example Im using is at http://www.cshrp.net/content.aspx?showID=547.

When I run my application I have to route the ports on my home server. Is there any way I can connect to applications over the internet and not have to worry about configuring port routing?


Thank you for your time.

Brent Newbury
 
In most modern networks you need to forward the ports to keep you machines secure.
To allowing so that you do not have to forward the ports would mean that you are allowing the machine to the wide world.

Some systems will allow you to use a proxy server to formard the network traffic. Have a look at this example http://www.mentalis.org/soft/projects/proxy/

brentnewbury said:
Hiya all,

Im trying to create a sample Peer 2 Peer chat application. However, Im having trouble with Network Address Translation (NAT). Programs like MSN/Windows Messenger use NAT (I know they arent coded in C# :)). However, when Im sending or listening for information Im using TCP Listeners and Clients. The example Im using is at http://www.cshrp.net/content.aspx?showID=547.

When I run my application I have to route the ports on my home server. Is there any way I can connect to applications over the internet and not have to worry about configuring port routing?


Thank you for your time.

Brent Newbury
 
Hiya Mykre,

I agree with what you said about port forwarding however, Windows/MSN Messenger do not need any port forwarding to be setup (well, they arent on my Windows Server 2003 home server). I was wondering how this was accomplished.


Thank you for your time,

Brent Newbury
 
With Almost all MS Products they are intergrated. When you install MSn on Windows XP with the firewall active the install package sets up the connection.

I know that if you setup a windows xp machine and have multiple applications installed... Then install SP2 most of those applications will not work (There is a list on MS on the applications that are afected, This is also one of the big complaints of SP2), You then have to add the ports and connections to the firewall system.
 
On another note if you wish to setup an application that opens or configures the firewall, you might want to have a look at the documentation on MS about rolling out firewall settings. This is mainly designed for administrators to mass upgrade there network, but you might be able to create a install addin that would configure the opening
 
Back
Top