Re: Connection Sharing on demand



On 8 Apr 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<1144515481.160268.237430@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Luiz Borges wrote:

I have a network in my office with about 20 desktops running XP Pro and
some of them running Win98, they all have internet connection through
ICS on an old PC running Win98.

Assume - old PC is dialing in now.

Now, I need a way to restrict the internet connection without restring
LAN access, so I'm thinking in using that old PC to run a DHCP server

Are the other 20 desktops coming and going all the time? Microsoft uses
DHCP to simplify the setup of the desktop at the cost of complexity in
the DHCP server and massive security problems. You _can_ run DHCP if
you want to, but I'd suggest looking at using static addressing.

on Linux/BSD/etc to provide basic LAN connectivity,

63814 Apr 20 2000 SMB-HOWTO
49404 Jan 6 15:22 Samba-Authenticated-Gateway-HOWTO

AND providing some sort of dial-up-like connection to internet.

40490 Jun 22 2000 Home-Network-mini-HOWTO
708351 Nov 14 09:34 IP-Masquerade-HOWTO
14614 Aug 22 2001 Linux-Modem-Sharing
17605 Jul 21 2004 Masquerading-Simple-HOWTO
155096 Jan 23 2004 Security-HOWTO
278012 Jul 23 2002 Security-Quickstart-HOWTO

270963 Apr 3 12:14 HOWTO-INDEX
96639 Apr 3 12:14 INDEX

So any user who have a logon to connect on the internet can sit in any of
the terminals and just dial-in to get connected. I think that can be done
with some sort of "reversed" VPN (you connect to get out, and not in), but
that seems kind lame.

There are many ways this can be done - the simplest method would be to set
the LAN IP of the dialin box as the default gateway on all of the desktops,
and run pppd on the dialin box in the demand mode. The pppd man page
discusses how. Briefly, you have two scripts, one that does the management
of pppd, and the other that dials the telephone. AN EXAMPLE would be

[compton ~]$ cat /usr/local/bin/dialin
#!/bin/bash
exec /usr/sbin/pppd connect "/usr/sbin/chat -f /etc/ppp/dialscript" \
defaultroute lock noipdefault modem /dev/modem 115200 crtscts \
user pele demand idle 300 holdoff 15
[compton ~]$

There must not be anything after the \ in those two lines.

[compton ~]$ cat /etc/ppp/dialscript
ABORT BUSY ABORT 'NO CARRIER' "" AT&F1 OK ATDT2662902 CONNECT \d\c
[compton ~]$

Here, 'pele' is the username at the ISP. There is also a secrets file that
contains the username and password for the ISP, in the form

pele * p42Sw0rD~

For the user, everything is transparent, though slightly delayed in
connecting. When there are packets for the internet, this script will
automagically dial to the ISP. When there has been no traffic on the
link for 300 seconds, the link is brought down.

How can that be done?

Many ways.

There are any recommended distros (preferably mini-distros) made for
that purpose?

http://www.distrowatch.com/

There are over 300 different Linux distributions. There are also several
different distributions of *BSD. That is the problem - so many choices.
But then, there are also so many different brands of beer and cars and...

http://tldp.org/guides.html
2. Linux Consultants Guide
http://tldp.org/LDP/lcg/html/index.html

That guide lists 67 different consultants who can help in Brazil, including
9 in Sao Paulo.

Old guy
.



Relevant Pages

  • Connection Sharing on demand
    ... ICS on an old PC running Win98. ... I need a way to restrict the internet connection without restring ... I think that can be done with some sort of "reversed" VPN (you connect ...
    (comp.os.linux.networking)
  • Connection sharing on demand
    ... ICS on an old PC running Win98. ... I need a way to restrict the internet connection without restring ... I think that can be done with some sort of "reversed" VPN (you connect ...
    (microsoft.public.win2000.networking)
  • Re: DHCP
    ... dynamic IP address...you should ask your college tech support people to be ... I have an LANconnection at the college I ... >> I assume your network connection uses a DHCP server ... Does the internet connection have to have ...
    (microsoft.public.windows.mediacenter)
  • Re: PCs Losing Internet Connection
    ... internet connection is restored. ... The DHCP server is on a Win2k server, and there are no viruses on the ...
    (microsoft.public.win2000.networking)
  • Re: Check out DHCP
    ... WinXP does not have DHCP, ... seeking a DHCP server. ... >Say more about what kind of Internet connection is ...
    (microsoft.public.windowsxp.work_remotely)