Title: Welcome to Red Hat Linux
 

private-setup

This is the ppp-server setup people ask me to describe in details. I am somewhere in the middle
to finish it. My resources are : single real IP, I know the address of the real Gateway and the
address of the name server. Both are outside of my setup, means I cannot modify them if like
to do it.
Lets imagine many subnets I marked as A(n). Each of them can be described as 192.168.n.x,
where x is the number of computers or whatever and n points out the subnet like 192.168.10.0.
each of these A(n) is connected to subnet B(k) through a phone line. K denotes a number
of ports available on B. Each port serves at the moment single A, assigned statically or
dynamically as we like. B is a little messy. It has got a machine I call biggy with two NIC-s.

                                                                          192.168.1.0---192.168.1.4(terminal server)
A(1)x--ethernet--A(gw)---ppp------ |
A(2)x--ethernet--A(gw)---ppp------ B(k) - 192.168.2.1/real IP----Internet
........-------------------ppp------|

Host (biggy) is 192.168.2.1. Its eth0 has my single real IP. It has also alias eth0:0 192.168.2.1
the same as host. Eth1 is 192.168.1.1 and is connected to the hub which spans a subnet
192.168.1.0. I have on it among others a terminal server - 192.168.1.4 ready to get a call.
So, we can say that B is a 192.168.1.0 plus a single machine from 192.168.2.0 with
an interface eth0 with the real IP.
OK. Thats all. Now all these guys A(n) and each of B-s  like to run Netscape , copy
files and read mailing lists. Mail server is not controlled by this setup. I know address of
mailserver sitting outside this setup. Different is with ftp and http. I installed Apache
on 192.168.2.1 (biggy -B) The same I did with BeroFTP server. Sits on the same place as
Apache. Additionally I wrote a homepage hanging on Apache so I do not have to always look
at index.html from Apache.
Since biggy deals with networks like 192.168.1.0, 192.168.10.0 and so on. We need therefore
run masquerading against those subnets. I places these commands in etc/profile.
    ipfwadm -F a m -S 192.168.1.0/24 -D 0.0.0.0/0    # for B
    ipfwadm -F a m -S 192.168.10.0/24 -D 0.0.0.0/0    # for A
    and so on for the rest...
My gateway is a real gw, the same with name server (put in resolv.conf) I know they are
somewhere on the ethernet. Eth0 is my default interface-route. I also enabled packet
forwarding (IPv4) on biggy(192.168.2.1)
I installed mgetty-1.1.16 and ppp-2.3.5. Both from sources and compiled as written in
readmes of both. Just follow the instruction. Since biggy has cyclades card with 32 ports
I had to install it and run mgetty on every port. This is done as follows:
In etc/inittab I wrote
s0:2345:respawn:usr/local/sbin/mgetty -D  /dev/ttyCn
Devices ttyCn you do using mkcyc delivered by cyclades. I delivered by myself from their
site. For ppp you need file options and options.ttyCn (in case you have any multiportcard)
My options looks like: -detach, asyncmap 0, crtscts, lock, auth, +pap, mru 1500, mtu 1500,
ms-dns - address, proxyarp.
My first options.ttyC0 is simple - :192.168.10.1
I checked it on A(1) where gw from A(1) has got address 192.168.10.11.
I forgot about pap-secrets on biggy. It looks
client    server        secrets        IP
andrzej    *                pass            *

Now is time for clients. let me describe only A(1). The rest is simply a copy.
The gateway on A(1) I call bozo. He is connected via modem with biggy and via eth0 with the
hub from 192.168.10.0. Host(bozo) is 192.168.10.11 as eth0 is.
I place commands into etc/profile like
    route add default gw 192.168.2.1        # biggy
    route add -net 192.168.10.0                # to see own slaves
    ipfwadm -F a m -S 192.168.10.0/24 -D 0.0.0.0/0        # local subnet has fun on Internet
Thats all on gw. Now a client
Each client on A has got an address the same as its eth0. For example - 192.168.10.13
One has to run a command on each client
    route add default gw 192.168.10.11        # bozo our local gw

I think it is all. You fire up ppp on bozo. I am using dip. It is very simple.
dip -t
port ttyS0
speed 38400
term
atz
atdt<number>
you get now login prompt, you give name and password.
You will see running pppd from other side. You do Ctrl-] and then type
get $local 0.0.0.0
mode ppp.
Thats really all. Now you can surf, read mail, run ftp. I tested to see my page on biggy then
immediately sunsite.unc.edu. Works. The same from each of the client.
Now what I forgot. I had to compile kernel with IP masquerading, IP-forwarding, gatewaying on every machine you can imagine.
Everything is done with linux machines. My real problem  and ask for a little help is to put
windoze as client. I compiled ppp on biggy with MS-DNS option and placed as you might
notice a parameter into options. When I login to biggy from Win95 then It stops somewhere
at recognizing the name and password. I got message that there are problems with compatible protocols for dial-up network. I looked into log on biggy and noticed that on the line where I should
see name=andrzej I see instead name=sequence of characters typical for pppd. I probably messed
up windoze setup isnt it? Well I appreciate any hint. I am ready to read (although I missed a readme
last time) and work hard like in my old time at the university.
Now I know what I forgot. The most fun I had when I telnetted to terminal server (192.168.1.4) from
the client on A, entered and from their I run ping back onto bozo (dynamically assigned address).
Andrzej
 

Reply via email to