Building an ISP Using Linux and an Intranet

This article describes how you can start an ISP and/or create an Intranet using Linux and a dedicated 28.8 connection.
Dial-up Shell Access for Users

This confirmation, which provides people with shell dial-up access, can be modified to provide dial-up PPP access to customers. We chose to modify the default login program (in the poeigl package) because we wanted to provide both PPP and shell access (useful when I'm remotely setting up someone's machine). The ppplogin program has a prompt that looks like this:

Username: jsmith
Password:
Please select PPP or Shell access:
1) PPP
2) Shell
Please enter your choice: 1

If the user picks the shell, Linux invokes the standard defined shell for the user. If PPP is selected, a script invokes pppd for the dial-up user and dynamically allocates him an IP address. Part of the C code for invoking the ppp script file looks like this:

/* --- PPP account login --- */
execlp ("/bin/sh", "-sh", "-c",
   "/etc/ppp/ppplogin", (char *)0);
fprintf (stderr,
   "login: couldn't exec shell script: %s.\n",
strerror (errno));
exit(0);
The /etc/ppp/ppplogin is shown in Listing 4.

When a user selects ppp, the server looks up the tty the person dialing in is using and assigns the tty an IP address. If the user always calls in on a specific line, he is given the same IP address. A user dialing in on the first line comes in on ttyC6. This is used to assign an IP address of 206.156.217.31 to the user. This creates a PPP link to the dial-up line like the PPP link to my host. The important parameters related to this tty/ppp connection in the ppplogin script are as follows:

  • Detach—don't run as a background process.

  • Modem—use the carrier lines to detect things like hanging up

  • 206.156.217.10:206.156.217.35—I am known as 206.156.217.10, and the person on the other end is known as 206.156.217.35.

Keeping the Connection Established

Early on we found our dedicated connection was frequently dropped by the phone company. I solved this problem by using a program called pppupd which constantly pings our ISP's machine and, if the ping fails, it invokes the ppp-on script to redial the connection.

Fax Services and Seamless Windows 95 Dial-up

Most of our customers are Windows 95 users who did not like having to type their name and password in each time they logged on to the server. To remove this source of irritation, we found a different getty package called mgetty, which provides autodetection of PPP dialers for Windows 95 users who want to use the Dial-up Networking dialog box. This has saved us quite a bit of time supporting Windows 95 users. The mgetty package (http://sunsite.unc.edu/pub/Linux/system/Serial/mgetty+sendfax) is difficult to set up, so read the documentation before building. One wonderful feature of this package is the capability to receive faxes on the incoming modem lines without additional hardware or additional lines. We can use the same dial-up lines to receive faxes.

E-mail

E-mail for us was automatically configured with my Linux installation. You can install pine for shell access and POP v3 for POP server e-mail. If you don't have the POP server installed, you can get a package called pop3d from any of the various sites, such as sunsite.unc.edu, and follow the instructions to install it.

Web Server

If you want your machine to host web pages, you have to install a web server. We downloaded the Apache web server (http://www.apache.org/) and recompiled and configured it using the available documentation. Compiling the source should create an httpd executable which can be copied into /usr/sbin. In addition, add the line /usr/sbin/httpd in the /etc/rc.d/rc.local configuration file for it to be automatically started during boot up.

Eric Harlow has been running NetBrain on Linux since February 1996. He's currently a consultant at RDA Consultants Ltd. His e-mail address is brain@netbrain.com.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Building an ISP

Anonymous's picture

One wonderful feature of this package is the capability to receive faxes on the incoming modem lines without additional hardware or additional lines. We can use the same dial-up lines to receive faxes.mırc mırc Chat indir chat indir Google Beni Sev Google Beni sev

i dont know what required

mohamad's picture

i dont know what required

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix