[ previous ] [ next ] [ threads ]
 From:  "Alex M" <radiussupport at lrcommunications dot net>
 To:  "Monowall Support List" <m0n0wall at lists dot m0n0 dot ch>
 Subject:  Finding right open port for NAT-Punch
 Date:  Wed, 4 Oct 2006 18:44:14 -0400
Ok this one is a little bit off topic, but no one else can give me clear

I'm writing a VB.net 2005 that supposes to send string to network pc over
the internet. In most cases PCs are behind NAT box, so my app should be able
to bypass router and reach destination PC. That is not possible because
router doesn't know where to forward request so it eats the package. In
order to work around that thing I can use server to whom client will send
request and because client behind NAT box initiated the connection somewhere
the router should have assigned the port for that client to communicate with
outside network so if we send socket back to that port it should reach the
client that initiated the connection. 


I did an app based on those assumptions but never got able to bypass mono
working as nat. Moreover it seams that I have different port numbers
detected on the same socket.


For example Im sending socket from laptop that is behind NAT to a Desktop
which is working as the server and is located on a wan interface of mono.
The socket is obviously delivered since there is no barrier, but here is
interesting observation.


Laptop says it's talking to the NAT on port 1438 (Local Endpoint Port),
while desktop says it got the socket from port 53010 (Remote End Point Port)

My app on laptop is being set automatically to listen to Local Endpoint Port
(1438 in this case), but when I send the packet from Desktop to the mono WAN
address on that port it gets nowhere. I even tried that 53010 port but no


Im a bit lost now so maybe some one had any experience in doing this and has
VB sample code, or at leas can some one tell how ports are signed to the
sockets on mono and in general, and why cant I go through with example I



And sorry for off topic post.