Monday, June 15, 2009

More problems with OWAMP behind NAT

Well, not all NAT problems were solved with the fixes detailed in the previous post. Indeed, the server does not check that the OWAMP client is sending from the address specified in the "receiver IP address" field of the Request-session message, but there are some outstanding problems.

First, the server will create a new socket for the test session, and will attempt to bind that socket to the address specified for the sender or the receiver in the request-session message. This address is, of course, the public address of the server as the message was created and sent by the client. Obviously, the server will fail in binding that socket to a public address it is not in none of its interfaces.

Second, the client must specify its actual public address in the sender/receiver IP address field of the request-session message, otherwise, the other end will not be able to send test packets to that address.

Therefore, some modification is required in the OWAMP code. On the client side, the public address must be specified in the messages. Also, on the server side, the server should bind the test socket to the private address, regardless of the address specified in the session-request message.

The client needs to know its actual public address on the public side of the NAT, which is specified by the new '-x' option of the owping program. The owampd daemon only needs to know if it is running behind a NAT or not, but it doesn't know the public address, makeing the server setup more simple. The -N flag is used in this case.

So, the extra requirement is for the client to know its public address, which can be obtained by a STUN client or a similar service.

Now, it definitely works fine, with both the server and the client running behind their respective NATs.

3 comments:

Pinghua Huang said...

Hi, thank you for sharing your knowledge. I have tried your previous post.

Would you explain more clearly about this post?

As you stated in the second post, still some problems. I tried to follow your solution again. However, I didn't catch the owping -x option and owampd -N option, since I didn't find these two options in my installed owamp3.2r4.

Thank you in advance!

Yann Tchapson said...

Hello pinghua, i have the same problem like you with owamp3.2r4. Did you may be find any solution to this problem? If yes just let me know.
Thanks in advance!

Unknown said...

I'm also with the same problem.