🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.networking
Article #174

Re: Win98 --> linux box --> modem --> internet

#174
From: Adrian Hands
Date: Tue, 29 Jun 1999 00:00
133 lines
5299 bytes
ricK wrote:
> 
> I have been using linux rh5.2 for some time now and have got a simple
> network up and running with one win98 machine and a linux server running
> SAMBA with no problems. I have had a request from a new customer that has
> the following setup in his office.
> One server running win98 and 5 clients also with win98, he wants all his
> pc's to connect to the internet by sharing a single modem on the server. I
> suggested linux for the new server using ip forwarding etc and samba, he has
> no knowledge of linux but was happy with something that will help to
> overthrow the 'evel empire'.
> My question are, does anyone know of some good infomation on how to do this.
> If anyone has had some experience with this type of setup, etc etc.
> Something that will cut down on the head scratching a bit would be great.
> 
> Thanks, Rick.   Please email me, replace aaaa with acay
> rashton@aaaa.com.au


If you want a book, Barnes & Noble carries "The Linux Network"
which covers this and Samba and...

I've setup my system to do this.
I also installed "diald" so that when any user on any of the LAN clients
tries to access the internet while the connection is down, my linux box
will automatically dial out and establish a ppp-connection and setup the
routing.
I've included the config I'm using.
It's not necessarily perfect, but it works good for me!

(BTW, I'm using RH6.0)
-----------

This is my /etc/rc.d/rc.local file (below).
My NE-2000 compatible nic doesn't get detected at boot,
so I added the depmod and modprobe lines here.

I put "alias eth0 ne io=0x240" to in /etc/conf.modules, but that didn't
seem to fix the problem.

The "ipchains" lines configure forwarding and masquerading with RH6.0.
The "ipfwadm" lines are the old commands that worked with RH5.2.
ipfwadm is *supposed* to work with 6.0 too, but I don't believe it does.

I setup the other PCs with 10.x.x.x addresses.
The "/8" means netmask = 255.0.0.0.

Using redhat's netcfg tool, I clicked on "Network Packet Forwarding
(IPv4)"
set the "default gateway" to be the IP address of the linux box
(10.1.1.130)
set the "default gateway device" to be "ppp0".
and put in a static route: if=eth0 addr=10.0.0.0 mask=255.0.0.0
gw=10.1.1.130

Since my system doesn't seem to pickup the ethernet card at boot,
(I think because it's configured to be at I/O=0x0240 and that's not one
of the addresses that ne.c probes),
I think I have to go into netcfg (as root) and click on
interfaces/eth0/activate at boot.
I'm not sure because I almost NEVER reboot my linux box.

I'm also running a DNS server (bind) on the linux box.
If you want the config files for that, let me know and I'll e-mail those
too.    

$ rpm -q ipchains
ipchains-1.3.8-3
$

/etc/rc.d/rc.local:

#!/bin/sh

# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

if [ -f /etc/redhat-release ]; then
    R=$(cat /etc/redhat-release)

    arch=$(uname -m)
    a="a"
    case "_$arch" in
            _a*) a="an";;
            _i*) a="an";;
    esac

    # This will overwrite /etc/issue at every boot.  So, make any
changes you
    # want to make to /etc/issue here or you will lose them when you
reboot.
    echo "" > /etc/issue
    echo "$R" >> /etc/issue
    echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue

    cp -f /etc/issue /etc/issue.net
    echo >> /etc/issue
fi

#echo "Building module dependencies..."
#depmod -a
#echo "Loading module for NIC card (NE2000 at 0x3a0)..."
# modprobe ne io=0x3a0
#modprobe ne io=0x240
echo "Enabling IP maquerading and configuring the firewall..."
modprobe ip_masq_ftp
#ipfwadm -Fp deny
ipchains -P forward DENY
#ipfwadm -Fa m -S10.0.0.0/8
ipchains -A forward -j MASQ -s 10.0.0.0/8

echo "Starting diald..."
if [ -x /usr/sbin/diald ]
then
    # starting diald
    echo "Starting diald daemon to SpryNet ..."
    # (cd /usr/lib/ppp && /usr/lib/ppp/diald.sprynet)
    /usr/sbin/diald /dev/modem \
        lock \
        debug 20 \
        mode ppp \
        local 127.0.0.2 \
        remote 127.0.0.3 \
        defaultroute \
        modem \
        crtscts \
        connect "chat -v -f /etc/sysconfig/network-scripts/chat-ppp0" \
        dynamic \
        -- debug noipdefault
fi

echo "rc.local done."
Technical Details
Message-ID: <3778B151.CF2D0222@sprynet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37761dda.0@stargate.acay.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102983,44a780b57ae9eae7
X-Google-Attributes: gid102983,public
X-Google-Thread: 1103af,44a780b57ae9eae7
X-Google-Attributes: gid1103af,public
X-Google-Thread: 10669a,44a780b57ae9eae7
X-Google-Attributes: gid10669a,public
From: Adrian Hands <ahands@sprynet.com>
Subject: Re: Win98 --> linux box --> modem --> internet
Date: 1999/06/29
Message-ID: <3778B151.CF2D0222@sprynet.com>
X-Deja-AN: 495154007
Content-Transfer-Encoding: 7bit
References: <37761dda.0@stargate.acay.com.au>
To: ricK <ricK@somewhere.com>
X-Accept-Language: en
X-Server-Date: 29 Jun 1999 11:32:22 GMT
Content-Type: text/plain; charset=us-ascii
Organization: Metro IS
Mime-Version: 1.0
Reply-To: AHands@unforgettable.com
Newsgroups: comp.os.linux.networking,comp.os.linux.misc,aus.computers.linux