LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-18-2004, 11:40 PM   #16
Necronomicom
Member
 
Registered: Jun 2004
Distribution: Slackware, Solaris
Posts: 127

Rep: Reputation: 15

I just made a router with a old 486 using slackware 10 very recently using only one network card, and the router in my house is a pentium 233 computer that I also use for other things like a testing/learning ftp, http, ssh, database, and backup server.

The first thing you need to do is a very basic slackware 10 install without any of the larger unnecessary packages, now you need to detect your network card(s), this can be a pain in the ass if you are using ISA cards and don't know how to get them working in linux...

After you get your card(s) working, setup your connecting using adsl-setup, make sure its working, now create a new executable file in /etc/rc.d/ called rc.router and add the following code to it:

Code:
ifconfig eth0:1 192.168.0.1


iptables=/sbin/iptables


iptables --flush -t nat


iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables --append FORWARD --in-interface eth0:1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
now add the following commands to your /etc/rc.d/rc.local file:
Code:
adsl-start
/etc/rc.d/rc.router
and you are finished, whatever you turn on your router/computer it will share the internet in the 192.168.0.1 gateway!!

Note: This is the way using a single network card connected to the hub, and the modem also connected to the hub, the procedure of doing it with 2 network cards is pretty much the same expect you need to change the eth0:1 to eth1 (or eth0) in the rc.router file.

Last edited by Necronomicom; 08-18-2004 at 11:51 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Distro To Make PC a Router zflauaus Linux - Distributions 4 11-07-2005 01:34 AM
Can't make a link with my router. pdeman2 Linux - Wireless Networking 8 08-20-2005 04:32 PM
Is it possible to make a pc work as a router/hub funkatron Linux - Hardware 1 07-14-2005 06:25 AM
Make a router engnet Linux - Networking 3 03-16-2004 04:45 PM
Trying to make a router ocularbob Linux - Networking 1 01-27-2003 01:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration