Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Dec 2000 19:47:43 -0800 (PST)
From:      Sean Peck <speck@newsindex.com>
To:        David Raistrick <keen@damoe.wireless-isp.net>
Cc:        Chris Hill <chris@monochrome.org>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Configuring Gateway/NAT on Freebsd
Message-ID:  <Pine.BSF.4.10.10012101945280.14499-100000@www.newsindex.com>
In-Reply-To: <Pine.BSF.4.21.0012102217320.61629-100000@damoe.wireless-isp.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Sun, 10 Dec 2000, Sean Peck wrote:
> 
> 
> > I have one machine, that has 1 NIC card, this card is configured with the
> > ifconfig commands to be listening to both 1 public IP address, and to
> > 172.16.0.1 
> 
> > I have configured tun0 to be 172.16.0.1 to public IP (or at least I
> > believe I have)
> 
> Ok, this appears to be one of the problems. 
> 
> tun0 is for userland ppp (vs ppp0 for kernel ppp)
> 
> You do not need it.

Ok, can remove.
 
> What you DO need (and i'll note that I can only say this in concept. I've
> not dealt with nat on a BSD machine since 2.2something..but i do it all
> day long with Cisco:) is to 
> 
> ifconfig xl0 inet 64.2.61.236 netmask 255.255.255.0 (assuming that
>     64...236 is the IP assigned by your provider, netmask as well)
> route add default 64.2.61.X   (as provided by the ISP for your default
>     route)

This is correct
 
> then,
> 
> ifconfig xl0 alias 172.16.0.1 netmask 255.255.255.0

	Have this
 
> 
> Then you need to configure natd to use xl0 for all outbound traffic, with
> the 64.2.61.236 IP.
> 
> so ( a quick scan of man natd )
> 
> natd -a 63.2.61.236
> 
> might do it.
> 
> Of course, all this assumes
>  sysctl -w net.inet.ip.forwarding=1
> 

Ok, how would I do this using in the rc.conf file?  or do I add both of
these lines to rc.local?

The sysctl line says operation not permitted, but have not tried as root
yet...




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.BSF.4.10.10012101945280.14499-100000>