News: This forum is now permanently frozen.
Pages: [1] 2
Topic: Why is my outbound UDP port being changed!  (Read 8441 times)
« on: May 31, 2009, 06:01:55 »
Killabytes.ca *
Posts: 14

Hey guys,

So after finally getting things up and running with monowall I ran into another wall so to speak.

We host a Urban Terror(game) server. I have the game set properly in the NAT and firewall. People can connect properly when they type in our server's IP. The problem is when the system sends the "heartbeat" to the server lists. It goes through UDP port 2790. But when it passes through monowall it changes it to 42566.

I have zero clue why this would happen. Is there a purpose to this? How about a way to stop it?
« Last Edit: June 08, 2009, 21:52:28 by Killabytes.ca »
« Reply #1 on: June 04, 2009, 11:41:25 »
david *
Posts: 18

You might want to get familiar with which is known as "port address translation" (PAT)
  • . It seems that the interval of the "heartbeat" is longer than the one m0n0wall is set to remember UDP port assignations.
  • <http://en.wikipedia.org/wiki/Port_address_translation>
« Reply #2 on: June 05, 2009, 22:07:35 »
Killabytes.ca *
Posts: 14

I'm afraid I don't understand.

Is monowall a PAT or NAT?

Either way, Could I Just set up my OPT1 card as a DMZ? If so, is there a how-to for this?

Thanks.
« Reply #3 on: June 05, 2009, 23:55:05 »
nayr *
Posts: 9

PAT is just a form of NAT, putting your game server in a DMZ should solve the issue.

13.1. Configuring a DMZ Interface Using NAT


« Last Edit: June 05, 2009, 23:57:34 by nayr »
« Reply #4 on: June 06, 2009, 00:48:15 »
Killabytes.ca *
Posts: 14

Thank you for the info.

We're just waiting on a few switch for the DMZ.

Smiley
« Reply #5 on: June 08, 2009, 19:13:32 »
swmspam *
Posts: 13

What version of m0n0wall are you using?

I found some strange UDP behavior when switching from 1.3b13 to 1.3b14 (and above). Search this forum "Hamachi" for some comments on this behavior.
« Reply #6 on: June 08, 2009, 21:53:34 »
Killabytes.ca *
Posts: 14

I am using the 1.235 CD Version.

Thanks for the information. I am browsing the search results now.
« Reply #7 on: June 10, 2009, 03:34:11 »
Killabytes.ca *
Posts: 14

After further checking. I fail to see how making the OPT card named DMZ really makes it a DMZ. If all I'm doing is opening up inbound ports....is that not the same as just opening them on the LAN card.

I say this because it does not work. DMZ is still behind a firewall.
« Reply #8 on: June 11, 2009, 15:52:55 »
swmspam *
Posts: 13

I haven't been able to confirm we are seeing similar problems, or if the root causes are totally different. I'll try running m0n0 this weekend using 1.235 and make a report.

I've been using the 1.3 beta versions. My problem popped up between b13 (works) and b14 (doesn't work).
« Reply #9 on: June 12, 2009, 04:32:11 »
Killabytes.ca *
Posts: 14

Well I'm out of ideas. I went through the "how to" for the DMZ. It left out enabling the DHCP for the DMZ interface. I did anyway, but it makes me wonder what else is left out.

I may try the beta and see what happens.

I'd hate to drop the monowall, it's a nice system. I really like it. But we need our game servers up and running, it's been 2 weeks now and it's a source of income.
« Reply #10 on: June 13, 2009, 16:37:35 »
swmspam *
Posts: 13

I'm setting up a test system this weekend. I've already proved there is a UDP port switching problem with some applications when running 1.3b14 or above. This weekend I am going to determine if the same problem occurs when upgrading from 1.233 to 1.235.

I'm guessing since 1.3b13 and 1.233 did not have "ipnat source port randomization patch from FreeBSD CVS", both will work.

Since 1.3b14 and 1.235 do have "ipnat source port randomization patch from FreeBSD CVS", both won't work.

I've already tested the difference between 1.3b13 and 1.3b14. This weekend I'll test the difference between 1.233 and 1.235.

I'm betting that if you "downgraded" to 1.233, your gaming system will work just fine.
« Reply #11 on: June 13, 2009, 17:09:58 »
Killabytes.ca *
Posts: 14

Thanks for the information!

I'll downgrade today and see what happens.

Thanks again.
« Reply #12 on: June 14, 2009, 03:40:37 »
swmspam *
Posts: 13

I ran a test tonight with the v1.2 and v1.3 m0n0wall releases using a UDP-based NAT traversal ("UDP hole punching") VPN package (Hamachi) running on both Linux and Windows.

The VPN established a peer-to-peer tunnel using UDP across m0n0wall v1.233 and 1.3b13. The software fails to make the UDP connection across m0n0wall v1.234 and 1.3b14.

My conclusion is the ipnat source port randomization patch from FreeBSD CVS is screwing up the peer-to-peer UDP tunnel.

However, other peer-to-peer NAT traversal software ("UDP hole punching"), such as Skype, appears to be working unaffected. I can't be sure, because it may be relaying through the Skype supernode. More research is required to determine if my Skype calls are p2p or relayed under the different m0n0wall versions.

I did not test a Yahoo Messenger file transfer, which I understand also uses a UDP NAT traversal technique. Same problem with testing, if Yahoo can't establish a peer-to-peer ("hole punching"), then the file transfer will relay through a Yahoo server.

I'm convinced that some UDP hole-punching NAT traversal software is adversely affected by the ipNAT source port randomization patch. This would includes some gaming systems.

Is there a way to disable the ipnat source port randomization patch in 1.3b14 (or 1.234) and higher?
« Last Edit: June 14, 2009, 15:05:04 by swmspam »
« Reply #13 on: June 15, 2009, 05:47:47 »
cmb *****
Posts: 851

Rewriting the source port will break some things, you just have to disable it if you use things that are affected (for most people this is fine, the sane behavior is to enable this by default). You can turn it off by enabling Advanced Outbound NAT and editing the outbound NAT rules accordingly.
« Reply #14 on: June 17, 2009, 16:58:56 »
swmspam *
Posts: 13

I enabled the Advanced Outbound NAT. The statement "edit the outbound NAT rules accordingly" is amazingly vague.

I edited the Auto rule for LAN and checkmarked Disable Port Mapping.

This seems to have worked. I'll monitor my system for a few days, especially if I need to add another rule specifically for the DMZ.

The biggest downside of this workaround is multiple machines can't access the same server through the same source port anymore. That's a steep price to pay to workaround the poor behavior of the path. I'm wondering if sticking with 1.3b13 is the best solution.


* PortRemapping.jpg (25.72 KB, 601x192 - viewed 381 times.)
 
Pages: [1] 2
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines