Using LINUX as network modem server using SLIP

Hello:

   I was succesful making a connection to my ISP using slip (dip) in my Linux machine, now I want other machines on the network to use this connection to access the Internet, How can I do it? I read somebody mentioning IP forwarding/masquerading but I don't know what this is or how it works.
Any ideas?
LVL 4
jlmsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jcolCommented:
If you want to use a linux box to forward packets from/to the internet, you are creating a gateway. (You should specify
this when compiling the kernel). The gateway configuration
is, as I believe, explained in the net2-howto which you
can find on any sunsite mirror. Now to IP masquerading :
if you only have one IP adress from your provider, you can only
run one computer with it directly. You can have a router (or your linux box) translate your internal ip adresses into the externally valid ones and back.
The configuration of such a gateway-router system requires an
understanding of the underlying principles. I recommend you
look around a bit on the net; e.g. cisco.com has a great website
where many networking topics are explained thoroughly.
(You do _not_ have to buy a cisco router ;-)...)

Hope this helps,
0
jlmsAuthor Commented:
Yes, all what you say sound reasonable, but at least resumed, what are the steps I should follow to connect another machine to the Internet using the Linux box as a router and taking in account I have only SLIP access? Let's say, I have Sun boxes and one SGI machine, how could I make sure users in those machines can use their WWW browsers? If I achieve this, I can do anything else.

Thank you for the help, but I need a little more of information from somebody with hands-on experience.

0
jcolCommented:
1. setup your slip dialout scripts (you did that already)
2. configure your kernel to include routing and gatewaying
(using make config) and compile the new kernel
3. install the new kernel with lilo or whatever loader you
use
4. now comes the net-howto; it explains how to configure
your linux box to route the requests on the internal network
to the outside world
5. configure your clients to use your linux box for ip
as gateway for ip traffic
6. done.
There is nothing special about sun,sgi or whatever - once a machine knows that it can send ip packets over your gateway,
everything is straightforward.
0
fandritCommented:
I think that the best way to become a small 'ISP' :) is the IP masquerade.Setting up the IP masquerade is quite easy.First of all you have to configure your kernel by typing make config at /usr/src/linux directory...You HAVE to say YES to the following:
 * Prompt for development and/or incomplete code/drivers
              CONFIG_EXPERIMENTAL
              - this will allow you to select experimental ip_masq code compiled
                into the kernel

            * Enable loadable module support
              CONFIG_MODULES
              - allows you to load modules

            * Networking support
              CONFIG_NET

            * Network firewalls
              CONFIG_FIREWALL
          
           * TCP/IP networking
              CONFIG_INET

            * IP: forwarding/gatewaying
              CONFIG_IP_FORWARD

            * IP: firewalling
              CONFIG_IP_FIREWALL

            * IP: masquerading (EXPERIMENTAL)
              CONFIG_IP_MASQUERADE
              - although it is experimental, it is a *MUST*

            * IP: always defragment
              CONFIG_IP_ALWAYS_DEFRAG
              - highly recommended
           * TCP/IP networking
              CONFIG_INET

            * IP: forwarding/gatewaying
              CONFIG_IP_FORWARD

            * IP: firewalling
              CONFIG_IP_FIREWALL

            * IP: masquerading (EXPERIMENTAL)
              CONFIG_IP_MASQUERADE
              - although it is experimental, it is a *MUST*

            * IP: always defragment
              CONFIG_IP_ALWAYS_DEFRAG
              - highly recommended

r compiling the kernel, you should compile and install the modules:

          make modules; make modules_install
If you want to enable ftp,irc,real audio you have to make a file contains the below

            /sbin/modprobe ip_masq_ftp
                /sbin/modprobe ip_masq_raudio
                /sbin/modprobe ip_masq_irc

and you load these every time your systems starts.
The last thing you have to set up is the permission...
Your clients have not real IP addresses so you have to assign them with 'intranets' ip's as 192.168.168.0 network.
Write down a file like that:

#!/bin/sh
ipfwadm -F -a m -S 192.168.168.X/32 -D 0.0.0.0/0
ipfwadm -F -a m -S 192.168.168.Y/32 -D 0.0.0.0/0
ipfwadm -F -a m -S 192.168.168.X/32 -D 0.0.0.0/0
# To permit the above IP addressess
                  .
                  .
                  .
ipfwadm -F -p deny
# To deny everybody else...

P.S. You have to run this file (or by command line) BEFORE
 establish the internet connection...

                  fandrit@ariadne-t.gr
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jlmsAuthor Commented:
Your answer is exactly what I needed, now my workstations use the little Linux box to access the Internet.

Thank you and sorry for the delay in grading your answer.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.