Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2000 23:34:46 -0800
From:      Eric Hampshire <ehampshire@scu.edu>
To:        freebsd-doc@FreeBSD.ORG
Cc:        jim@freebsd.org
Subject:   NAT Documentation
Message-ID:  <00f701bf9563$6e0b52c0$0301000a@yourmom.dhs.org>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_00F4_01BF9520.5FAC9060
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Okay, here it is... the documentation for setting up a gateway under =
FreeBSD.  I wrote in as Thomas Hargrove earlier (he's my roommate) =
because he was on my computer using my burner.  Anyways, here it is:

=20
Setting up a Gateway

=20

Step 1:

                Note: The following steps assume you have a PCI network =
card that you are adding to your machine.  If you plan on adding an ISA =
network card you are going to have to recompile your kernel after adding =
the IRQ and port number (ex. 0x280) to the proper place in your kernel =
source.  If you already have two PCI network cards installed skip down =
to the part that starts "Pick a range.".

               =20

                Install two network cards in a machine running FreeBSD.  =
One network card should have an IP assigned by your ISP (a static IP) or =
by DHCP (a dynamic IP), also assigned by your ISP.  This network card is =
the external interface and you should have instructions on what to set =
the IP and netmask to.  Now you have some choices for the other network =
card which will be the internal interface.  The following IP ranges are =
available for private networks:

=20

10.0.0.1 - 10.255.255.254              mask 255.0.0.0

172.16.0.1 - 172.16.255.254              mask 255.240.0.0

192.168.0.1 - 192.168.255.254            mask 255.255.0.0

=20

Pick a range and then an IP for your gateway.  This IP will the default =
gateway you set on all the machines on your internal network.  Add a =
line in your rc.conf (located in /etc) so this network card is =
configured and set up on bootup.

=20

            In the following example the network is set up with a =
FreeBSD machine connected via Pacbell DSL to the internet.  Pacbell DSL =
provides the IP 216.103.215.136 and the default gateway 216.103.215.254. =
 The FreeBSD machine is the gateway with an IP of 10.0.1.11 and is =
providing NAT (network address translation) for two Windows 98 machines, =
with the IP addresses 10.0.1.2 and 10.0.1.3.  Both these Windows =
machines should set their default gateway to be 10.0.1.11.

=20

Example:

#here's where you list your network cards (in this example called pn0 =
and pn1)

network_interfaces=3D"pn0 pn1 lo0"

=20

#here's the external interface (IP and default router provided by ISP)

ifconfig_pn0=3D"inet 216.103.215.136 netmask 255.255.255.0

defaultrouter=3D"216.103.215.254"

=20

#here's the internal interface configuration (what you need to add)

ifconfig_pn1=3D"inet 10.0.1.11 netmask 255.255.255.0"


=20

Step 2:

            Now you're ready to configure the kernel.  You will need to =
recompile the kernel to add the routing options it needs to do NAT =
(network address translation).  You need to have the kernel source =
installed.  It will be located in /usr/src/sys.  If you do not have this =
directory, run /stand/sysinstall and add the Kern-Developer packages.  =
Here's what you need to do now:

=20

            # cd /usr/src/sys/i386/conf

            # cp GENERIC LOCAL

=20

Now you need to edit LOCAL with your favorite text editor (vi, emacs, =
pico, etc.).  In this example I use vi.

=20

            # vi LOCAL

=20

In the options section, add these lines:
=20
            options        IPFIREWALL
            options        IPFIREWALL_DEFAULT_TO_ACCEPT
            options        IPDIVERT

=20

Now go the end of the file and make sure that the following line is =
there:

=20

            pseudo-device               bpfilter 4            #Berkeley =
packet filter

=20

The number after bpfilter is adjustable.  The number 4 is used above =
because it's a good default value, but this number depends on the number =
of simultaneously instances you need running on your gateway.  For =
example, if you plan to run DCHP, NAT, and a tcpdump at the same time, =
then you need that number to be 3.

                Okay, now you're ready to recompile your kernel.  Follow =
these steps:

=20

                # config LOCAL

                # cd /sys/compile/LOCAL

                # make clean

                # make depend

                # make

                # make install

=20

This last step, "make install" copies your old kernel to /kernel.old and =
puts in the newly compiled kernel.  Now it's time to edit rc.conf again. =
 Again, use your favorite text editor (my choice is vi here) and add the =
following lines:

=20

                firewall_enable=3D"YES

                firewall_type=3D"open"

                gateway_enable=3D"YES"

                natd_enable=3D"YES"

                natd_interface=3D"pn0"                #This is the =
external (public) interface

=20

If you get your IP dynamically (ie. Through DHCP) then add the following =
line:

=20

                natd_flags=3D"-dynamic"

=20

=20

Step 3:

                Reboot!!!  That's it.  If something goes wrong and it =
won't boot you can always hit something other than RETURN when it asks =
you to and type "boot kernel.old" to boot the machine using your old =
kernel.





Thanks for letting me write it!

Eric Hampshire


------=_NextPart_000_00F4_01BF9520.5FAC9060
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Okay, here it is... the documentation =
for setting=20
up a gateway under FreeBSD.&nbsp; I wrote in as Thomas Hargrove earlier =
(he's my=20
roommate) because he was on my computer using my burner.&nbsp; Anyways, =
here it=20
is:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Setting up a=20
Gateway<?xml:namespace prefix =3D o ns =3D =
"urn:schemas-microsoft-com:office:office"=20
/><o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Step=20
1:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>Note: The following steps assume you have a PCI network card that =
you are=20
adding to your machine.<SPAN style=3D"mso-spacerun: yes">&nbsp; =
</SPAN>If you plan=20
on adding an ISA network card you are going to have to recompile your =
kernel=20
after adding the IRQ and port number (ex. 0x280) to the proper place in =
your=20
kernel source.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>If you =
already have=20
two PCI network cards installed skip down to the part that starts =
&#8220;Pick a=20
range&#8230;&#8221;.<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN><o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>Install two network cards in a machine running FreeBSD.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>One network card should have =
an IP=20
assigned by your ISP (a static IP) or by DHCP (a dynamic IP), also =
assigned by=20
your ISP.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>This network =
card is the=20
external interface and you should have instructions on what to set the =
IP and=20
netmask to.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>Now you have =
some=20
choices for the other network card which will be the internal =
interface.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>The following IP ranges are =
available=20
for private networks:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"TEXT-INDENT: 0.5in"><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: 10pt">10.0.0.1 - =
10.255.255.254&nbsp;=20
&nbsp; &nbsp; <SPAN=20
style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</SPAN>mask=20
255.0.0.0<o:p></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"TEXT-INDENT: 0.5in"><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: 10pt">172.16.0.1 - =
172.16.255.254&nbsp;=20
&nbsp; <SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>mask 255.240.0.0<o:p></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"TEXT-INDENT: 0.5in"><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: 10pt">192.168.0.1 - =
192.168.255.254&nbsp;=20
<SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>mask 255.255.0.0<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoBodyText>Pick a range and then an IP for your =
gateway.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>This IP will the default =
gateway you set=20
on all the machines on your internal network.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>Add a line in your rc.conf =
(located in=20
/etc) so this network card is configured and set up on bootup.</P>
<P class=3DMsoBodyText>&nbsp;<o:p></o:p></P>
<P class=3DMsoBodyText><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>In the following example the network is set up with a FreeBSD =
machine=20
connected via Pacbell DSL to the internet.<SPAN style=3D"mso-spacerun: =
yes">&nbsp;=20
</SPAN>Pacbell DSL provides the IP 216.103.215.136 and the default =
gateway=20
216.103.215.254.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>The =
FreeBSD=20
machine is the gateway with an IP of 10.0.1.11 and is providing NAT =
(network=20
address translation) for two Windows 98 machines, with the IP addresses =
10.0.1.2=20
and 10.0.1.3.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>Both these =
Windows=20
machines should set their default gateway to be 10.0.1.11.</P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">Example:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">#here&#8217;s=20
where you list your network cards (in this example called pn0 and=20
pn1)<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">network_interfaces=3D&#8221;pn0 pn1=20
lo0&#8221;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">#here&#8217;s=20
the external interface (IP and default router provided by=20
ISP)<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">ifconfig_pn0=3D&#8221;inet 216.103.215.136=20
netmask 255.255.255.0<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">defaultrouter=3D&#8221;216.103.215.254&#8221;<o:p></o:p></SPAN></P>=

<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">#here&#8217;s=20
the internal interface configuration (what you need to=20
add)<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">ifconfig_pn1=3D&#8221;inet 10.0.1.11=20
netmask 255.255.255.0&#8221;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt"><BR>&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">Step=20
2:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>Now you&#8217;re ready to configure the kernel.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>You will need to recompile the =
kernel to=20
add the routing options it needs to do NAT (network address =
translation).<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>You need to have the kernel =
source=20
installed.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>It will be =
located in=20
/usr/src/sys.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>If you do =
not have=20
this directory, run /stand/sysinstall and add the Kern-Developer =
packages.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>Here&#8217;s what you need to =
do=20
now:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN># cd /usr/src/sys/i386/conf<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN># cp GENERIC LOCAL<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">Now you=20
need to edit LOCAL with your favorite text editor (vi, emacs, pico, =
etc&#8230;).<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>In this example I use=20
vi.<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN># vi LOCAL<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">In the=20
options section, add these lines:<BR>&nbsp;<BR>&nbsp; &nbsp; <SPAN=20
style=3D"mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>options&nbsp; &nbsp; &nbsp; &nbsp; IPFIREWALL<BR>&nbsp; =
&nbsp;<SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>options&nbsp; &nbsp; &nbsp; &nbsp; =
IPFIREWALL_DEFAULT_TO_ACCEPT<BR>&nbsp;=20
&nbsp; <SPAN style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>options&nbsp; &nbsp; &nbsp; &nbsp; IPDIVERT<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">Now go the=20
end of the file and make sure that the following line is=20
there:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>pseudo-device<SPAN style=3D"mso-tab-count: 1">&nbsp;&nbsp; =
</SPAN><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>bpfilter 4<SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>#Berkeley packet filter<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-FAMILY: Geneva; FONT-SIZE: =
10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">The=20
number after bpfilter is adjustable.<SPAN style=3D"mso-spacerun: =
yes">&nbsp;=20
</SPAN>The number 4 is used above because it&#8217;s a good default =
value, but this=20
number depends on the number of simultaneously instances you need =
running on=20
your gateway.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>For =
example, if you=20
plan to run DCHP, NAT, and a tcpdump at the same time, then you need =
that number=20
to be 3.<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>Okay, now you&#8217;re ready to recompile your kernel.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>Follow these=20
steps:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN># config LOCAL<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN># cd /sys/compile/LOCAL<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN># make clean<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN># make depend<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN># make<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN># make install<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">This last step, =
&#8220;make=20
install&#8221; copies your old kernel to /kernel.old and puts in the =
newly compiled=20
kernel.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>Now it&#8217;s =
time to edit=20
rc.conf again.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>Again, use =
your=20
favorite text editor (my choice is vi here) and add the following=20
lines:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>firewall_enable=3D&#8221;YES<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>firewall_type=3D&#8221;open&#8221;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>gateway_enable=3D&#8221;YES&#8221;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>natd_enable=3D&#8221;YES&#8221;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>natd_interface=3D&#8221;pn0&#8221;<SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>#This is the external (public) interface<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">If=20
you get your IP dynamically (ie. Through DHCP) then add the following=20
line:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>natd_flags=3D&#8221;-dynamic&#8221;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: =
12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Step=20
3:<o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN=20
style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
</SPAN>Reboot!!!<SPAN style=3D"mso-spacerun: yes">&nbsp; =
</SPAN>That&#8217;s it.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>If something goes wrong and it =
won&#8217;t=20
boot you can always hit something other than RETURN when it asks you to =
and type=20
&#8220;boot kernel.old&#8221; to boot the machine using your old =
kernel.</SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"></SPAN>&nbsp;</P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"></SPAN>&nbsp;</P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Thanks for letting =
me write=20
it!</SPAN></P>
<P class=3DMsoNormal><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Eric=20
Hampshire<o:p></o:p></SPAN></P></FONT></DIV></BODY></HTML>

------=_NextPart_000_00F4_01BF9520.5FAC9060--



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00f701bf9563$6e0b52c0$0301000a>