The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 NATD & Port mapping
Author: Brad 
Date:   11-01-01 08:01

I have FreeBSD 4.1 running on my gateway (say 123.456.123.456) and at this point, everything works. I want to host starcraft games (which ive read run on port 6112) and im trying to map this port to my computer (10.0.0.2) inside the LAN.

The gateway is running natd and currently i have this into the natd.cf:

deny incoming no
interface ed0
use_sockets yes
same_ports yes
unregistered_only yes
dynamic yes
redirect_port tcp 10.0.0.2:6112 6112
redirect_port udp 10.0.0.2:6112 6112

this wont work for me...according to what ive read, this is really all i need to do, but it still doesnt work.

PLEASE HELP...i wanna play starcraft...and maybe adapt this to some other uses....

Reply To This Message
 
 Re: NATD & Port mapping
Author: Daniel Schrock 
Date:   11-01-01 17:08

In my experience, NAT and gaming don't get along too well.
I did finally find a way to play, but hosting is impossible.

if I were you, I would use ipfilter/ipnat instead of natd/ipfw. it is, in my opinion, much easier to configure and caters to gaming quite well.

here is my config:
map xl0 192.168.113.0/28 -> 216.80.53.93/32 # general NAT
rdr xl0 216.80.53.93/32 port 8080 -> 192.168.113.13 port 8080 tcp/udp # betty web
rdr xl0 216.80.53.93/32 port 23666 -> 192.168.113.13 port 23666 tcp/udp # betty- quake server-ext
rdr dc0 198.168.113.1/28 port 23666 -> 192.168.113.13 port 23666 tcp/udp # betty- quake server-int
rdr xl0 216.80.53.93/32 port 23960 -> 192.168.113.14 port 23960 tcp/udp #kaos- ra server
rdr dc0 192.168.113.14/28 port 23960 -> 192.168.113.14 port 23960 tcp/udp #kaos- ra server
rdr xl0 216.80.53.93/32 port 27960 -> 192.168.113.3 port 27960 tcp/udp # valhalla- vampire

this worked 'ok'. basically...only my roommate could play vampire online (but he still could not host). anyone could play Quake3 and Rocket Arena. all other games were victims of problems if 2 of us tried to play the same game at once online. the game would become jumpy, and occasionally a packet intended for my roommate would come to me and vice versa... internal only games were never a problem.
if you are the only gamer, you will be fine, though you won't be able to host. if you have roommates that game, then remember, any port you map for them is a port you can't use. you may want to consider getting a public /29.

Reply To This Message
 
 Re: NATD & Port mapping
Author: Brad 
Date:   11-01-01 22:37

well, as my network is set up right now, i have NO problems at all playing games with my brother, or even 3 of us in the same game. Im not sure i want to take your advice and change to ipnat/ipfilter if it slows things down when multiple users are in the same game.

i was also trying to map a port so i can view web pages running on my internal box from a different http port. Is it any more likely that this can work with nat?

Reply To This Message
 
 Re: NATD & Port mapping
Author: NKritsky 
Date:   28-01-01 15:13

Maybe you should try this:

instead of
> redirect_port tcp 10.0.0.2:6112 6112
try:
redirect_port tcp 10.0.0.2:6112 123.456.123.456:6112

and
> redirect_port udp 10.0.0.2:6112 6112
redirect_port udp 10.0.0.2:6112 123.456.123.456:6112

That's what i have put in my natd.conf when wanted to allow Internet users access my HTTP servers.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org