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>

index | next in thread | raw e-mail

[-- Attachment #1 --]
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:

 
Setting up a Gateway

 

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.".

                

                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:

 

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

 

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.

 

            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.

 

Example:

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

network_interfaces="pn0 pn1 lo0"

 

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

ifconfig_pn0="inet 216.103.215.136 netmask 255.255.255.0

defaultrouter="216.103.215.254"

 

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

ifconfig_pn1="inet 10.0.1.11 netmask 255.255.255.0"


 

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:

 

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

            # cp GENERIC LOCAL

 

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

 

            # vi LOCAL

 

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

 

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

 

            pseudo-device               bpfilter 4            #Berkeley packet filter

 

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:

 

                # config LOCAL

                # cd /sys/compile/LOCAL

                # make clean

                # make depend

                # make

                # make install

 

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:

 

                firewall_enable="YES

                firewall_type="open"

                gateway_enable="YES"

                natd_enable="YES"

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

 

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

 

                natd_flags="-dynamic"

 

 

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


[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2919.6307" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Okay, here it is... the documentation for setting 
up a gateway under FreeBSD.&nbsp; I wrote in as Thomas Hargrove earlier (he's my 
roommate) because he was on my computer using my burner.&nbsp; Anyways, here it 
is:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Setting up a 
Gateway<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" 
/><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Step 
1:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>Note: The following steps assume you have a PCI network card that you are 
adding to your machine.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>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.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>If you already have 
two PCI network cards installed skip down to the part that starts &#8220;Pick a 
range&#8230;&#8221;.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>Install two network cards in a machine running FreeBSD.<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>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.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>This network card is the 
external interface and you should have instructions on what to set the IP and 
netmask to.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Now you have some 
choices for the other network card which will be the internal interface.<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>The following IP ranges are available 
for private networks:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-INDENT: 0.5in"><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">10.0.0.1 - 10.255.255.254&nbsp; 
&nbsp; &nbsp; <SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>mask 
255.0.0.0<o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-INDENT: 0.5in"><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">172.16.0.1 - 172.16.255.254&nbsp; 
&nbsp; <SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>mask 255.240.0.0<o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-INDENT: 0.5in"><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">192.168.0.1 - 192.168.255.254&nbsp; 
<SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>mask 255.255.0.0<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoBodyText>Pick a range and then an IP for your gateway.<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>This IP will the default gateway you set 
on all the machines on your internal network.<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>Add a line in your rc.conf (located in 
/etc) so this network card is configured and set up on bootup.</P>
<P class=MsoBodyText>&nbsp;<o:p></o:p></P>
<P class=MsoBodyText><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>In the following example the network is set up with a FreeBSD machine 
connected via Pacbell DSL to the internet.<SPAN style="mso-spacerun: yes">&nbsp; 
</SPAN>Pacbell DSL provides the IP 216.103.215.136 and the default gateway 
216.103.215.254.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>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.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Both these Windows 
machines should set their default gateway to be 10.0.1.11.</P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">Example:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">#here&#8217;s 
where you list your network cards (in this example called pn0 and 
pn1)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">network_interfaces=&#8221;pn0 pn1 
lo0&#8221;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">#here&#8217;s 
the external interface (IP and default router provided by 
ISP)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">ifconfig_pn0=&#8221;inet 216.103.215.136 
netmask 255.255.255.0<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">defaultrouter=&#8221;216.103.215.254&#8221;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">#here&#8217;s 
the internal interface configuration (what you need to 
add)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">ifconfig_pn1=&#8221;inet 10.0.1.11 
netmask 255.255.255.0&#8221;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt"><BR>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">Step 
2:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>Now you&#8217;re ready to configure the kernel.<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>You will need to recompile the kernel to 
add the routing options it needs to do NAT (network address translation).<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>You need to have the kernel source 
installed.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>It will be located in 
/usr/src/sys.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>If you do not have 
this directory, run /stand/sysinstall and add the Kern-Developer packages.<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>Here&#8217;s what you need to do 
now:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN># cd /usr/src/sys/i386/conf<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN># cp GENERIC LOCAL<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">Now you 
need to edit LOCAL with your favorite text editor (vi, emacs, pico, etc&#8230;).<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>In this example I use 
vi.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN># vi LOCAL<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">In the 
options section, add these lines:<BR>&nbsp;<BR>&nbsp; &nbsp; <SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>options&nbsp; &nbsp; &nbsp; &nbsp; IPFIREWALL<BR>&nbsp; &nbsp;<SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>options&nbsp; &nbsp; &nbsp; &nbsp; IPFIREWALL_DEFAULT_TO_ACCEPT<BR>&nbsp; 
&nbsp; <SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>options&nbsp; &nbsp; &nbsp; &nbsp; IPDIVERT<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">Now go the 
end of the file and make sure that the following line is 
there:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>pseudo-device<SPAN style="mso-tab-count: 1">&nbsp;&nbsp; </SPAN><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>bpfilter 4<SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>#Berkeley packet filter<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-FAMILY: Geneva; FONT-SIZE: 10pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">The 
number after bpfilter is adjustable.<SPAN style="mso-spacerun: yes">&nbsp; 
</SPAN>The number 4 is used above because it&#8217;s a good default value, but this 
number depends on the number of simultaneously instances you need running on 
your gateway.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>For example, if you 
plan to run DCHP, NAT, and a tcpdump at the same time, then you need that number 
to be 3.<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>Okay, now you&#8217;re ready to recompile your kernel.<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>Follow these 
steps:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN># config LOCAL<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN># cd /sys/compile/LOCAL<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN># make clean<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN># make depend<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN># make<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN># make install<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">This last step, &#8220;make 
install&#8221; copies your old kernel to /kernel.old and puts in the newly compiled 
kernel.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Now it&#8217;s time to edit 
rc.conf again.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Again, use your 
favorite text editor (my choice is vi here) and add the following 
lines:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>firewall_enable=&#8221;YES<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>firewall_type=&#8221;open&#8221;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>gateway_enable=&#8221;YES&#8221;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>natd_enable=&#8221;YES&#8221;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>natd_interface=&#8221;pn0&#8221;<SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>#This is the external (public) interface<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">If 
you get your IP dynamically (ie. Through DHCP) then add the following 
line:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>natd_flags=&#8221;-dynamic&#8221;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Step 
3:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><SPAN 
style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>Reboot!!!<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>That&#8217;s it.<SPAN 
style="mso-spacerun: yes">&nbsp; </SPAN>If something goes wrong and it won&#8217;t 
boot you can always hit something other than RETURN when it asks you to and type 
&#8220;boot kernel.old&#8221; to boot the machine using your old kernel.</SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"></SPAN>&nbsp;</P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"></SPAN>&nbsp;</P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Thanks for letting me write 
it!</SPAN></P>
<P class=MsoNormal><SPAN 
style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Eric 
Hampshire<o:p></o:p></SPAN></P></FONT></DIV></BODY></HTML>
help

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