UDP - client behind NAT, server behind NAT question

Hello group,

I'm trying to set up a UDP link between a mobile client on a GPRS network, and a base server, both behind NAT.

Currently I'm getting the client-> server leg OK, and I'm replying to the translated address on the client's network, but I've just realised that I need to deal with the source of the server's reply.

So if the server is listening on, say 85.1.1.66 : 7000 , it's no good me replying from an internal private address, as this will get NATted as the packets leave the server system.

I have to make sure my return message originates with 85.1.1.66 : 7000 don't I? Currently port 7000 is being forwarded to my private address inside the server's firewall. Maybe I just need to send my reply on port 7000. Does that work in the reverse direction (can't try it til Monday)?

Sorry if this is a horribly newbie question, but I'm an applications programmer whose been chucked off the UDP cliff :-)

If this is not the likely problem, could someone just suggest how addresses etc affect the passed messages in the client NAT / NAT server scenario.

cheers, Jim

Reply to
jmlawton
Loading thread data ...

Yup, that made me think, and clearly that's what I have to do, when I reply on port 7000 say, the IP address gets rewritten to be that of the forwarder, and so will look valid to the originating NAT.

Thanks for being "cardboard programmers" guys...

Jim

Reply to
jmlawton

UDP is connectionless.

You should implement NAT traversal yourself in your application layer protocol.

Yours, VB.

Reply to
Volker Birk

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.