I have done some updating to docid_1491 on "How Do I add my network information" in sections of different releases.
I'd appreciate it if someone(s) would look it over and indicate any corrections that need to be made. Thx, ~Lynn ############# start of FAQ ################################### Each version of LEAF has a different set of files and variables to setup the required networking. All current releases have made provisions for using DHCP on the primary (external) interface. If you are using DHCP for connection to your ISP, it is likely you will not have to set any configuration up in the following files to get your router working as a basic router. People with static ethernet connections, ppp (dial-up), pppoe (many xDSL providers), and people that desire to use something other than the default LAN (internal) setup; such as using a particular internal network address block, configuring more than one internal network, and/or using a DMZ type network will need to know how these configuration files are used. The details of the network configuration file differ considerably between Oxygen, Dachstein, and Bering, so we will describe the procedures separately. 3.6.1 Adding network information to Oxygen and LRP 2.9.x In Oxygen, LRP 2.9.4, and LRP 2.9.8, the /etc/network.conf file contains a series of blocks used to add various pieces of the information needed to run a LEAF firewall/router. Adding network information involves editing the entries in three of the blocks: Interfaces, Networks, and Gateways. Editing Interfaces: each interface on your system requires a block of 5 entries, each entry beginning with "IF#;", where #; is the interface number. For each interface you will be using, uncomment the first entry, then complete the entries following the pattern of this example: IF0_IFNAME=eth0 # the interface name as reportedby "ifconfig -a". IF0_IPADDR=192.168.1.23 # The IP address assigned the interface. IF0_NETMASK=255.255.255.0 # The netmask; the example is typical for an i nternal interface. IF0_BROADCAST=192.168.1.255 # The broadcast address; the example is typical for an internal interface. IF0_IP_SPOOF=YES # sets up some basic firewall protection. A typical image includes entry templates for IF0_* and IF1_*. If you have more interfaces, just add more blocks; the system will check for blocks from IF0_* to IF#_*, where # is the number specified in MAX_LOOP, an entry near the top of the file. Editing Networks: each network that your system is connected to requires a block of 6 entries, each entry beginning with "NET#", where # is the network number. Only the first of these needs to be uncommented and customized in a typical system: NET0_NETADDR=192.168.1.0 # the network number Typically, you will have one network block for each interface block. The network numbers should be consistent with the netmask/broadcast numbers entered for the corresponding interface. As with the IF#_* blocks, you can add more networks up to the number specified in the MAX_LOOP entry. Editing gateways: This is where you enter the information for your default route, the IP address to which IP datagrams addressed to non-local addresses should be sent. It consists of a block of three lines, to be completed as in the following example: GW0_IPADDR=192.168.1.86 # the IP address for the default gateway GW0_IFNAME=$IF1_IFNAME # put here the IF#_IFNAME value for the interface that LEAF should use to reach the default route GW0_METRIC=1 # the gateway's priority; always 1 if you have only 1 default route Basic routing setups will have only one default route. If you have several; you can add them as additional GW#_* blocks, up to the number specified in the MAX_LOOP entry. 3.6.2 Adding network information to Dachstein/Eigerstein/Materhorn/Eiger When you first log in to one of these LEAF releases, the system will run the script "lrcfg". This presents you with a menu of choices to use in configuring your system. From the menu, select first Network settings, then Network Configuration (auto). This will start the text editor "ae" and open the file /etc/network.conf for editing. Network information is configured by variables which are set in /etc/network.conf. The variables all start with the name of the interface (typically eth0 or eth1). Replace the 'xxx' used in these examples with the actual interface name. At a minimum, each interface needs the following three variables defined: xxx_IPADDR - Sets the IP address of the interface xxx_MASKLEN - Sets the interface mask length (do NOT use dot-quad notation, this should be a number between 0 and 32) xxx_BROADCAST - Broadcast address to use for the interface In addition, you may want to define these parameters: xxx_DEFAULT_GW - This should be defined on your external interface to tell LEAF how to get packets 'to the internet'. You should only have one default gateway defined per machine, typically on your external interface. xxx_IP_SPOOF - Protect against IP address spoofing on this interface. Set this to 'YES' unless you have a good reason not to. xxx_IP_KRNL_LOGMARTIANS - Kernel logging of spoofed packets on this interface. Set this to 'YES' unless you have a good reason not to. 3.6.3 Adding network information to Bering When you first log in to Bering, the system will run the script "lrcfg". This presents you with a menu of choices to use in configuring your system. From the menu, select first Network settings, then interfaces. This will start the text editor "e3" in "ae-mode and open the file /etc/network/interfaces for editing. Network information is configured in sections by connection-type which are in the file /etc/network/interfaces. There are pre-defined configuration sections for external (ISP) connections such as DHCP (default) ethernet, Static ip ethernet, PPPoE, and PPP (dial-up). Simply find the connection type that matches what you need and uncomment it (remove the "#" at the beginning of the line). Do not forget to comment the sections that you will not be using! The auto INTERFACE line is where you will enter the interface being used, the default for each section should be correct. Hint: The sections to select from are labeled 1.1, 1.2, 1.3, and 1.4 # Step 1: configure external interface # uncomment/adjust one of the following 4 options # Option 1.1 (default): eth0 / dynamic IP from pump/dhclient auto eth0 iface eth0 inet dhcp # # Option 1.2: eth0 / Fixed IP (assumed to be 1.2.3.4). # (broadcast/gateway optionnal) #auto eth0 #iface eth0 inet static # address 1.2.3.4 # network 1.2.3.0 # netmask 255.255.255.0 # broadcast 1.2.3.255 # gateway 1.2.3.1 # # Option 1.3: PPP/PPPOE (modem connected to eth0) #auto ppp0 #iface ppp0 inet ppp # pre-up ip link set eth0 up # provider dsl-provider eth0 # # Option 1.4: PPP modem #auto ppp0 #iface ppp0 inet ppp # provider provider Next is a section to configure you LAN (private network) side of the router. Again, the auto INTERFACE line sets which network card that is configured, the you enter the proper information into the rest of the variables (address, network, netmask, and broadcast). The defaults should be fine, unless you have a specific reason to change them. You can add additional interfaces by copying this section for each additional network card and entering the proper information. # Step 2: configure internal interface # Default: eth1 / fixed IP = 192.168.1.254 auto eth1 iface eth1 inet static address 192.168.1.254 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 ############################ end of FAQ ############################# -- ~Lynn Avants aka Guitarlynn guitarlynn at users.sourceforge.net http://leaf.sourceforge.net If linux isn't the answer, you've probably got the wrong question! _______________________________________________ Leaf-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-devel
