return to first page linux journal archive
keywordscontents

Listing 5. Linux Router Project (LRP) 2.9.4 /etc/network.conf Configuration

# Auto configuration bypass (Say NO to use this file)
##################################################
DIRECT_SETTINGS_ONLY=NO
##################################################
# Default Settings
##################################################
VERBOSE=YES
MAX_LOOP=2
# Turn on Forwarding  IP Feature
IPFWDING_KERNEL=YES
IPFWDING_FW=YES
# Set a hostname (found below). The name is set 
# further down.
CONFIG_HOSTNAME=YES
# Set a /etc/hosts file - you can set 
# individual entries further down, but for most of
# us we don't need to use it.
CONFIG_HOSTSFILE=NO
# Setup /etc/resolv.conf - you can set 
# individual entries further down. This would only
# be needed if you are doing any name and IP 
# address comparisons before you let someone 
# into your network. i.e.: ALL: PARANOID in 
# /etc/hosts.allow.
CONFIG_DNS=NO
##################################################
# Interfaces
##################################################
# connection towards the local LAN
IF0_IFNAME=eth0
IF0_IPADDR=192.168.0.1
IF0_NETMASK=255.255.255.0
IF0_BROADCAST=192.168.0.255
# Protect against spoofed IP addresses. This helps
# prevent someone from trying to sneak through our
# security by making them appear to have an IP 
# address they are not assigned to use. Examples
# include someone trying to break in using one of 
# your Internal IP addresses when they are in fact 
# coming from the Internet.
IF0_IP_SPOOF=YES
# connection towards the Internet (using our 
# sample IP addresses from Figure 1)
IF1_IFNAME=eth1
IF1_IPADDR=193.181.132.24
IF1_NETMASK=255.255.255.0
IF1_BROADCAST=193.181.132.255
# Protect against spoofed IP addresses
IF1_IP_SPOOF=YES
##################################################
# Hosts
##################################################
# This is not needed in our example
##################################################
# Networks
##################################################
# local Network Config.
NET0_NETADDR=192.168.0.0
NET0_NETMASK=$IF0_NETMASK
NET0_GATEWAY_IF=default
NET0_GATEWAY_IP=default
# Masquerade our internal local IP addresses
NET0_IPMASQ=YES
NET0_IPMASQ_IF=default
# Internet Network config (again using the sample 
# information in Figure 1)
NET1_NETADDR=193.181.132.0
NET1_NETMASK=$IF1_NETMASK
NET1_GATEWAY_IF=default
NET1_GATEWAY_IP=default
# Don't masquerade external Internet IP 
# addresses
NET1_IPMASQ=NO
NET1_IPMASQ_IF=default
##################################################
# Gateways (Default Routes)
##################################################
# Internet Gateway config (again using the sample 
# information in Figure 1)
GW0_IPADDR=193.181.132.1 
GW0_IFNAME=$IF0_NAME
GW0_METRIC=0
##################################################
# Hostname	Requires: CONFIG_HOSTNAME=YES
##################################################
HOSTNAME=myrouter
##################################################
# Hosts file (Static domainname entires
# Requires: CONFIG_HOSTSFILE=YES
# This is used if CONFIG_HOSTSFILE=YES set above.
##################################################
#   IP       FQDN         hostname alias1 alias2..
#HOSTS0="$IF0_IPADDR  $HOSTNAME.somewhere.net  $HOSTNAME mr rtr"
#HOSTS1="192.168.1.22  host2.somewhere.net  host2 h2"
##################################################
# Domain Search Order and Name Servers
# Requires: CONFIG_DNS=YES
# This is set if you set CONFIG_DNS=YES above.
##################################################
#DOMAINS="somewhere.net domain2.net"
#DNS0=192.168.1.1
#DNS1=192.168.1.2
##################################################
# Brief instructions for this file
##################################################
# DIRECT_SETTINGS_ONLY=(YES/NO)       Default: YES 
# Bypass automatic configuration using this file's
# settings, and only execute the commands in 
# /etc/network_direct.conf
# VERBOSE=(YES/NO)                    Default: Yes
# Be verbose about settings.
#
# MAX_LOOP=(int)                      Default: 10
# Maximum number of incrementable entries to search<\n> 
# for. IE: If you create a DNS7=, and MAX_LOOP=7, 
# it will not be reached.
# (DNS0 - DNS7 == 8 entires)
# Setting this value too high will decrease the 
# speed of the configuration system.
#
# IPFWDING_KERNEL=(YES/NO)            Default: NO
# Enable IP forwarding in the kernel.
#
# IPFWDING_FW=(YES/NO)                Default: NO 
#   (requires ipfwadm)
# Set firewall forwarding policy to 'allow'.
#
# CONFIG_HOSTNAME=(YES/NO)            Default: NO
# Create /etc/hostname file using HOSTNAME entry.
# Any current hostname file will be *OVERWRITTEN*
#
# CONFIG_HOSTSFILE=(YES/NO)		Default: NO
# Create /etc/hosts file using HOSTSx entries.
# Any current hosts file will be **OVERWRITTEN**
#
# CONFIG_DNS=(YES/NO)		Default: NO
# Create /etc/resolv.conf file using DOMAINS and 
# DNSx entries.
# Any current resolv.conf file will be **OVERWRITTEN**
#
##################################################
#END