Main Topics
Browse All TopicsI've got a 350mhz pentium with 64mb memory and 6gb hard drive that I'd love to make into a router for a private LAN with internet access. The proposed linux router has 4 network cards and is running Debian 2.2.22 kernel. I'd like to know how to configure the network with one card for pppoe with a dsl modem, and the other 3 cards to connect to 3 local computers running linux and winxp. I need all the config files and other settings for the linux router and the other linux machines. My idea is to enable internet access and file sharing for each of the 3 client machines. I know how to configure Samba; I don't know the network configuration commands and config files needed to make build the network. Thanks. Vince
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Although not recommended, you can use a ready-made firewall script that will cater for NAT and general security of the router. Alternative is to write a custom script manually.
Here is the script:
http://www.tux.org/~peterw
/etc/sysconfig/network-scr
contains network interface settings for their appropriate names : eth0 through to eth4 in your case.
command used to alter these setting in the run time is either /sbin/ifconfig
or /sbin/ip
(use "ip link" and "ip addr" for interface setup)
/etc/ppp/
directory contains the config files for PPP links
pppoe command is what you need I guess for pppoe connection.
Also ...Try e-smith...i love this thing ....www.e-smith.org
It has a build in router-nat-dialup/xdsl/cab
just setup this firewall/internet sharing script in a file called /etc/rc.d/rc.firewall
and call it from your /etc/rc.d/rc.local
(just add a line like this: /etc/rc.d/rc.firewall)
Per your configuration, this could help:
# I think you have DSL. if it's already starting, then
# delete the "adsl-start" line:
adsl-start
#Activate IP Forwarding
echo 1 > /proc/sys/net/ipv4/ip_forw
ipt="/usr/local/sbin/iptab
outside=ppp0
inside=eth1
other=eth0
$ipt -F
$ipt -t nat -F
$ipt -t mangle -F
$ipt -P INPUT DROP
$ipt -P OUTPUT DROP
$ipt -P FORWARD DROP
$ipt -A INPUT -i lo -j ACCEPT
$ipt -A INPUT -i $inside -j ACCEPT
$ipt -A OUTPUT -i $inside -j ACCEPT
$ipt -A FORWARD -i $inside -j ACCEPT
$ipt -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#Accept at least traffic to ssh into this host.
$ipt -A INPUT -p tcp --dport 22 -j ACCEPT
#now the nat thing.
$ipt -t nat -A POSTROUTING -o $outside -j MASQUERADE
---
This script will not forward anything from eth0 to eth1.
as you asked to be, but forwards (it does not nat) from eth1 to eth0, and NAT from eth1 to ppp0, any ip they could have.
ON THE OTHER HAND:
you do not need a network card for each other computer you have. it's way simpler to have a HUB/SWITCH and connect your eth0 network card to it, and all other computers to the same HUB/SWITCH.
now, just setup the ip address of your eth0, and in all other computers setup that IP as the gateway to the internet.
it's that simple.
check this diagram:
internet---dslmodem---linu
you can see your linuxbox has two ends. one is the network card connected to the dsl modem, and the other is the card connected to the hub, which in turn connect all the computers.
a good network subnet if you do not know how to begin is
192.168.0.0/24, which means your linux box will be 192.168.0.1/255.255.255.0,
all the other computers should have 192.168.0.1 as the default gateway, and your linux box should not have a gateway setup, as the dsl utility need to setup the default gateway dinamically.
Hope this helps
look to make my linux machine a router what i did, i first made all my lan cards up, obviously with an ip address each. this u can do with the help of running "#setup" command. or use the "#ifconfig" comman.
next u have to see the routing table of ur machine, with the help of "#route" command. set teh routing table according to ur needs.
see the man pages of "ifconfig" and "route". its easy, u can do it.
good luck.
vlt123:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
Business Accounts
Answer for Membership
by: kiranghagPosted on 2003-03-15 at 20:34:16ID: 8145540
there is a project just made for this
its named as linux router project