Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 2000 22:10:41 -0400 (EDT)
From:      "Kyle R. Green" <greek@lagparty.org>
To:        Marc Silver <marcs@draenor.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: UserPPP, natd, and Battle.net, oh my!
Message-ID:  <Pine.LNX.4.20.0006102158460.24888-100000@k6.crackaddict.com>
In-Reply-To: <Pine.LNX.4.20.0006102007310.20177-100000@k6.crackaddict.com>

next in thread | previous in thread | raw e-mail | index | archive | help
After a few hours of aimless playing, I was able to figure it out.  It
involves two steps:

1)  Make sure there are rules to allow UDP on port 6112 in your firewall
rules file.

***Begin snippet***
# Allow me to play Starcraft
$fwcmd add allow udp from any to any 6112 out xmit tun0
$fwcmd add allow tcp from any to any 6112 out xmit tun0
$fwcmd add allow udp from any 6112 to any in recv tun0
$fwcmd add allow tcp from any 6112 to any in recv tun0

# Divert all packets through the tunnel interface.
$fwcmd add divert natd all from any to any via tun0
***End snippet***

2)  Use ipnat to direct these UDP ports from your external interface too
the internal computer.  Yes, this means that only one box behind the NAT
can play at a time, and you have to change the port redirections to do
that.

Here's the line I use:

rdr tun0 209.222.79.0/24 port 6112  -> 10.0.0.2 port 6112  udp

I use 209.222.79.0/24 because I get allocated an IP somewhere in the that
subnet, but I'm not going to get any traffic for any other IPs.  SO this
is "safe" for me.  And "safe" for other dialup IP users.

Your mileage may vary.

--
Kyle R. Green
greek@lagparty.org


On Sat, 10 Jun 2000, Kyle R. Green wrote:

> On Sun, 11 Jun 2000, Marc Silver wrote:
> 
> > With ipfw you can specifically allow certain UDP ports, which should
> > allow you to kick some Zerg butt...  ;)
> 
> Hm.
> 
> Well, I got the NAT working, but I can't get the UDP necessary for
> Battlenet to work.
> 
> I have these additional rules in my fwrules
> 
> $fwcmd add divert natd udp from 10.0.0.2 to 140.186.18.204 6112 out xmit tun0
> $fwcmd add divert natd udp from 140.186.18.204 to 10.0.0.2 6112 in recv tun0
> 
> Where 10.0.0.2 is my Win2k box and 140.186.18.204 is the bnetd server I
> use.
> 
> Additionally, I also tried:
> 
> $fwcmd add allow udp from 10.0.0.2 to 140.186.18.204 6112 out xmit tun0
> $fwcmd add allow udp from 140.186.18.204 to 10.0.0.2 6112 in recv tun0
> 
> As well as a bunch of other permutations.
> 
> Is there a way for me to basically make everything going to UDP port 6112
> pass unmolsted through to 10.0.0.2 and from there back to the world?
> 
> Thanks for the well-written tutorial and all your help!
> 
> --
> Kyle R. Green
> greek@lagparty.org
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.20.0006102158460.24888-100000>