
|

|

|

|

 |
| Tech Update Linux |
 |
Linux firewall on a 486: A guard-Penguin for your DSL or cable modem connection.
Configuring the router
By Eric House & Henry Kingman
ZDNet Reviews & Solutions
October 23, 2001

[an error occurred while processing this directive] |
Configuring the router
Now, we'll configure the router by editing /etc/network.conf.
There are twelve changes to be made, as
outlined below. Begin by opening the file: still in lrcfg,
type 'q' a couple of times to get up to the top level
(relaunching it if you accidentally quit the whole thing) and
type '1' ("Network settings") then '1' ("Network Configuration
(auto)") to launch ae.
In discussing the changes to /etc/network.conf below, I've
put what you'll see from the stock file in the left column,
and the changes I made in the right, in the order in which
they appear in the file. You'll need to make similar
changes.
- Set the MAX_LOOP variable to two. We're
only using two Ethernet cards.
| Original file | My file |
| MAX_LOOP=6 | MAX_LOOP=2 |
-
Turn on IP forwarding. That's what you want a router for, right?
IPFWDING_KERNEL=NO
IPFWDING_FW=NO
|
IPFWDING_KERNEL=YES
IPFWDING_FW=YES
|
-
Might as well give your router a more interesting name than
"myrouter". You'll assign the actual name later.
| CONFIG_HOSTNAME=NO | CONFIG_HOSTNAME=YES |
-
Turn on DNS.
| CONFIG_DNS=NO | CONFIG_DNS=YES |
-
Enable and configure the ethernet interface that'll talk to
the cable modem and the outside world. Uncommenting makes the
configure script pay attention to it. The rest of the numbers are
provided by your ISP (or like the broadcast address, inferable.
The broadcast address is the same as your IP address in those
segments where the netmask is 255, and is 255 in those segments
where your netmask is 0. So if my netmask were 255.255.0.0 my
broadcast address would be 111.222.255.255.)
#IF0_IFNAME=eth0
IF0_IPADDR=192.168.1.194
IF0_NETMASK=255.255.255.192
IF0_BROADCAST=192.168.1.255
|
IF0_IFNAME=eth0
IF0_IPADDR=111.222.33.254
IF0_NETMASK=255.255.255.0
IF0_BROADCAST=111.222.33.255
|
- Enable and configure the ethernet interface that'll talk to
your internal network. Be sure to use an address that's meant
for networks that won't ever be connected to the net (rather
than one that might conflict with someone else's legitimate IP
address). You'll certainly want to choose one of the Class C
addresses, so your netmask will be unchanged and your
broadcast address will have a single 255.
#IF1_IFNAME=eth1
IF1_IPADDR=192.168.2.1
IF1_NETMASK=255.255.255.0
IF1_BROADCAST=192.168.2.255
|
IF1_IFNAME=eth1
IF1_IPADDR=10.0.128.1
IF1_NETMASK=255.255.255.0
IF1_BROADCAST=10.0.128.255
|
-
Uncomment and configure the IP address of the host (gateway)
your eth0 interface will be talking to. This is the gateway
address you got from your ISP. It's likely but not certain that
like mine it'll be the same as your static IP address but with a 1
as the last segment.
#HOST0_IPADDR=192.168.7.123
HOST0_GATEWAY_IF=default
HOST0_GATEWAY_IP=192.168.1.200
|
HOST0_IPADDR=111.222.33.1
HOST0_GATEWAY_IF=default
HOST0_GATEWAY_IP=111.222.33.1
|
-
Uncomment and configure the network address of the network your
IP address is on. This will usually be your IP address with the
last segment replaced with a 0.
| #NET0_NETADDR=192.168.1.192 | NET0_NETADDR=111.222.33.0 |
-
Add a section configuring the network your second Ethernet card
is on -- your internal network. NET1_NETADDR will almost certainly
be the same as IF1_IPADDR but with the last segment 0 instead of 1.
nothing
nothing
nothing
nothing
nothing
nothing
|
NET1_NETADDR=10.0.128.0
NET1_NETMASK=$IF1_NETMASK
NET1_GATEWAY_IF=default
NET1_GATEWAY_IP=default
NET1_IPMASQ=YES
NET1_IPMASQ_IF=default
|
-
Uncomment the line telling the config scripts that your ISP's
gateway and host are the same. This is the most common case but
may not always be true.
| #GW0_IPADDR=$HOST0_IPADDR | GW0_IPADDR=$HOST0_IPADDR |
-
Give your router a name -- since you said above that you would.
| HOSTNAME=myrouter | HOSTNAME=pauling |
-
Enter the DNS server[s] your ISP told you to use.
DNS0=192.168.1.1
DNS1=192.168.1.2
|
DNS0=24.1.4.12
DNS1=24.1.4.14
|
That's it! Save your changes and exit ae. Now back the
changes up to the floppy by typing 'q' once to get back to
lrcfg's main menu, and then 'b' for "Back-up ramdisk". Choose
'e' for "Everything EXCEPT log" and then confirm at each point
that you want the package (.lrp file) written to disk. If you
skip this step all your changes will be lost when you reboot.
 |
 |
|
|
|
![]() |
|
[an error occurred while processing this directive] |
![]() |
 |
![]() |

|

|

[an error occurred while processing this directive]



|

|

|

|