diff --git a/data/tutorials/ppp/ppp.sgml b/data/tutorials/ppp/ppp.sgml index 948bbba412..8edeb42750 100644 --- a/data/tutorials/ppp/ppp.sgml +++ b/data/tutorials/ppp/ppp.sgml @@ -1,5 +1,5 @@ - +
@@ -8,7 +8,7 @@ url="mailto:SimsS@IBM.NET" name="<SimsS@IBM.NET>"> -$Date: 1997-01-19 15:39:16 $ +$Date: 1997-01-21 05:49:54 $ This is a step-by-step guide for configuring FreeBSD systems to act as a dial-up router/gateway in a Local Area Environment. All entries may @@ -146,7 +146,7 @@ information to prevent trouble in subsequent steps.

It's possible that the FreeBSD host name was specified and saved when the system was initially installed. To verify that it was, enter -the following command at a prompt,:

+the following command at a prompt:

# hostname @@ -168,12 +168,11 @@ probably see 'myname.my.domain` as a response. You'll need to edit Configuring the FreeBSD Host Name -

*** Reminder: You must be logged in as 'root' to edit the +

Reminder: You must be logged in as 'root' to edit the system configuration files! -*** CAUTION: If you mangle the system configuration files, -chances are your system WILL NOT BOOT correctly! Be -careful! +CAUTION: If you mangle the system configuration files, +chances are your system WILL NOT BOOT correctly! Be careful!

The configuration file that specifies the FreeBSD system's host name when the system boots is in /etc/sysconfig. Use the @@ -231,10 +230,10 @@ FreeBSD system (Ethernet and others), enter the following command: # ifconfig -a (In layman's terms: "Show me the +

An example: + # ifconfig -a ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 @@ -247,13 +246,14 @@ An example: lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 # _ - + +

In this example, the following devices were displayed:

- + - + In this example, the 'ed0' device is up and running. The key @@ -267,10 +267,10 @@ indicators are:

If the line for the Ethernet card had shown something similar to: - + ed0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500 ether 01:02:03:04:05:06 - + then the Ethernet card hasn't been configured yet.

If the configuration for the Ethernet interface is correct you can @@ -279,13 +279,11 @@ Otherwise, proceed with the next section. Configuring your Ethernet Interface -

*** Reminder: You must be logged in as 'root' to edit the -system -configuration files! +

Reminder: You must be logged in as 'root' to edit the +system configuration files! -*** CAUTION: If you mangle the system configuration files, -chances are your system WILL NOT BOOT correctly! Be -careful! +CAUTION: If you mangle the system configuration files, +chances are your system WILL NOT BOOT correctly! Be careful!

The configuration file that specifies settings for the network interfaces when the system boots is in /etc/sysconfig. Use @@ -317,8 +315,8 @@ network_interfaces="lo0 ed0" ("lo0") and the Ethernet device ("*** Reminder: If your Ethernet card isn't named ' Reminder: If your Ethernet card isn't named '

If you performed the installation of FreeBSD over a network connection then the '*** NOTE: This line may already be set to 'NOTE: This line may already be set to ' -Creating the List of other LAN -Hosts(/etc/hosts) +Creating the List of other LAN Hosts(/etc/hosts)

The final step in configuring the LAN side of the FreeBSD system is to create a list of the names and TCP/IP addresses of the various @@ -436,13 +433,13 @@ configuration example in Section 3.2.) the comments along the way; there's some good information there!) and enter (assuming our sample network) the following IP addresses and host names: - + 192.168.1.1 curly curly.my.domain # FreeBSD System 192.168.1.2 larry larry.my.domain # Windows '95 System 192.168.1.3 moe moe.my.domain # Windows for Workgroups System 192.168.1.4 shemp shemp.my.domain # Windows NT System - +

(No changes are needed to the line for the '127.0.0.1 localhost' entry.) @@ -477,14 +474,14 @@ interfaces.

You should see: - + # ping localhost PING localhost.my.domain. (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.219 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0.287 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0.214 m [...] - + messages scroll by until you hit Ctrl-C to stop the madness. @@ -497,14 +494,14 @@ messages scroll by until you hit Ctrl-C to stop the madness. You should see: - + # ping curly PING curly.my.domain. (192.168.1.1): 56 data bytes 64 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=0.219 ms 64 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0.200 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=0.187 ms [...] - + messages.

One important thing to look at in these two examples is that the @@ -605,7 +602,7 @@ dial-out connection working.

Below is the /etc/ppp/ppp.conf file that we'll be using to provide a dial-out Internet gateway for our example LAN: - + ################################################################ # PPP Configuration File ('/etc/ppp/ppp.conf') # @@ -657,7 +654,7 @@ set ifaddr 127.1.1.1/0 127.2.2.2/0 255.255.255.0 add 0 0 127.2.2.2 ################################################################ # End of /etc/ppp/ppp.conf - + This file, taken verbatim from a working system, has three relevant configuration sections: @@ -684,8 +681,7 @@ Under FreeBSD the '/dev/cuaa0' device is the same port that's known as "COM1:" under DOS, Windows, Windows 95, etc....

If your modem is on COM2: you should specify -'/dev/cua01;, COM3: -would be '/dev/cua02'. +'/dev/cua01; COM3: would be '/dev/cua02'. set speed 57600 @@ -962,9 +958,9 @@ This last line tells the PPP program that it should add a default route for IP traffic that points to the (fake) IP address of the ISP's system. -*** Note: If you used an ISP-specified address instead of +Note: If you used an ISP-specified address instead of 127.2.2.2 on the preceeding line, use the same number here -instead of 127.2.2.2. +instead of 127.2.2.2.

By adding this "fake" route for IP traffic, the PPP program can, while idle: @@ -996,7 +992,7 @@ install a new default route that points the actual IP address of the remote end (discovered during the dial-up connection setup). A representative '/etc/ppp/ppp.linkup' file: - + #########################################################################= # PPP Link Up File ('/etc/ppp/ppp.linkup') @@ -1031,7 +1027,7 @@ MYADDR: add 0 0 HISADDR ######################################################################## # End of /etc/ppp/ppp.linkup - + Notice that there is a section in this file named "demand:", identical to the configuration name used in the '/etc/ppp/ppp.conf' file. This section instructs the PPP program that once a link is @@ -1047,8 +1043,8 @@ established using this configuration, it must: Dial-on-Demand configurations) execute the "delete ALL" and "add 0 0 HISADDR" commands in /etc/ppp/ppp.linkup. -

This is the mechanism that controls the actual on-demand -configuration of the link. +

This is the mechanism that controls the actual on-demand +configuration of the link.

All configurations not explicitly named in /etc/ppp/ppp.linkup will use whatever commands are in the @@ -1473,7 +1469,7 @@ Esentially, it tells the Name Server:

Using the '/etc/namedb/named.boot with the following contents: - + ; boot file for mini-name server directory /etc/namedb @@ -1482,14 +1478,14 @@ directory /etc/namedb cache . named.root primary my.domain. mydomain.db - +

Lines that begin with a semi-colon are comments. The significant lines in this file are: directory /etc/namedb

Tells the Name Server where to find the configuration files -referenced in the remaining sections of -the '/etc/namedb/named.boot' file. +referenced in the remaining sections of the +'/etc/namedb/named.boot' file. cache . named.root

Tells the Name Server that the list of "Top-Level" DNS servers for the Internet can be found in a file called 'named.root'. @@ -1516,7 +1512,7 @@ refer to the

The /etc/namedb/mydomain.db file for our minimal DNS server has the following contents: - + @ IN SOA my.domain. root.my.domain. ( 961230 ; Serial 3600 ; Refresh @@ -1540,7 +1536,7 @@ $ORIGIN 1.168.192.IN-ADDR.ARPA $ORIGIN 0.0.127.IN-ADDR.ARPA IN NS curly.my.domain. 1 IN PTR localhost.my.domain. - +

In simple terms, this file declares that the local DNS server is: The Start of Authority for ("SOA") for a domain called @@ -1566,37 +1562,37 @@ changing a single line in '/etc/sysconfig' as follows:

Using the '/etc/sysconfig. Scroll down approximately 200 lines until you come to the section that says: - + --- # Set to appropriate flags for named, if you have a full-time # connection to the Internet. # For most hosts, flags should be "-b /etc/namedb/named.boot" namedflags="NO" --- - + Change this section to read: - + --- # Set to appropriate flags for named, if you have a full-time # connection to the Internet. # For most hosts, flags should be "-b /etc/namedb/named.boot" namedflags="-b /etc/namedb/named.boot" --- - + Save the file and reboot. Alternatively, start the Name Server daemon by entering the following command: - + # named -b /etc/namedb/named.boot - +

Whenever you modify any of the files in /etc/namedb you'll need to kick-start the Name Server process to make it pick up the modifications. This is performed with the following system command: - + # kill -HUP `cat /var/run/named.pid` - + Playing with PPP filters @@ -1634,7 +1630,7 @@ What follows is a snippet from an operating system which provides a good foundation for "normal" Internet operations while preventing PPP from pumping + # # KeepAlive filters # Don't keep Alive with ICMP,DNS and RIP packet @@ -1719,7 +1715,7 @@ briefly describe the logic of each rule set: # # If none of above rules matches, then packet is blocked. #------- - +

Up to 20 distinct filtering rules can be applied to each class of filter. Rules in each class are number sequentially from 0 to 20