IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

Diald HOWTO

Search Howtos :Match :
Next Previous Contents

7. Conecting a computer to a group of different ISPs with a modem and PPP

Many times, one standalone computer does not only connect to just one network. It is common to connect to different networks or to the Internet using some different service providers. In this case, changing configuration files each time you want to connect to a different site can be annoying.

The solution i propose here consist in using different sets of configuration files for each different connection. You can find here some scripts to automate changing from one to another.

7.1 Note about sending mail using a relay host

If your email client program uses a local Message Transfer Agent with a smtp relay host to send all messages, or if you use a email client program that sends the messages directly to your provider's smtp server, changing where you are connecting means you need to reconfigure this option for the smtp relay server. This is because the providers usually check if the receipt mailbox is local or to any domain directly maintained by this provider or if the origin ip address is from the range of ip addresses that this provider assigns, to avoid having an open relay server that can be used to send spam, anonymous message and so on.

In the following examples, you will find how to change this parameter in the Smail configuration files in a simple configuration where all external messages are sent to a smtp relay server. If you use another Message Transfer Agent (MTA) in your system, you can send me what you must change in your MTA to include it here. If you use an email client program that directly sends to the external smtp server (Kmail, Netscape, etc.) send me your changes too.

7.2 Scripts to automate multiple connections and changing from one to another

Starting up

First of all, create a subdirectory of /etc/diald called providers where you store your scripts to automatically change from one to another provider and the subdirectories with the set of files to configure each of the providers connections.

With the next script this directory is created and filled with the current configuration files from Diald, chat, pppd and Smail, that will be treated as a template for the next configurations.

#!/bin/sh
#File /etc/diald/providers/setupdialdmultiprovider
mkdir /etc/diald/providers
mkdir /etc/diald/providers/setup
cp /etc/ppp/pap-secrets /etc/diald/providers/setup
cp /etc/ppp/chap-secrets /etc/diald/providers/setup
cp /etc/resolv.conf /etc/diald/providers/setup
cp /etc/diald/diald.options /etc/diald/providers/setup
cp /etc/diald/standard.filter /etc/diald/providers/setup
cp /etc/diald/personal.filter /etc/diald/providers/setup
cp /etc/diald/diald.connect /etc/diald/providers/setup
cp /etc/chatscripts/provider /etc/diald/providers/setup
cp /etc/diald/ip-up /etc/diald/providers/setup
cp /etc/diald/ip-down /etc/diald/providers/setup
cp /etc/smail/routers /etc/diald/providers/setup

New provider

With the next script the template configuration will be copied to a new directory to prepare it for a new provider connection or a new net connection. This script (/etc/diald/providers/newdialdprovider) will need a parameter with the provider or net name.

#!/bin/sh
#File /etc/diald/providers/newdialdprovider
mkdir /etc/diald/providers/$1
cp /etc/diald/providers/setup/* /etc/diald/providers/$1

Now, you will modify as you need the new files in /etc/diald/providers/provdidername, being providername the parameter passed to newdialdprovider.

Changing from one to another

At the end, with this script you will change all your configuration files related to Diald to connect to another provider or net. I use symbolic links to avoid using duplicate files. Using symbolic links, if you change any config file in its original location like /etc/resolv.conf, the change is really made in the /etc/diald/providers/providername/resolv.conf file.

#!/bin/sh
#File /etc/diald/providers/setdialdprovider
/etc/init.d/diald stop
#wait for Diald to stop.
sleep 4
ln -sf /etc/diald/providers/$1/pap-secrets /etc/ppp
ln -sf /etc/diald/providers/$1/chap-secrets /etc/ppp
ln -sf /etc/diald/providers/$1/resolv.conf /etc
ln -sf /etc/diald/providers/$1/diald.options /etc/diald
ln -sf /etc/diald/providers/$1/standard.filter /etc/diald
ln -sf /etc/diald/providers/$1/personal.filter /etc/diald
ln -sf /etc/diald/providers/$1/diald.connect /etc/diald
ln -sf /etc/diald/providers/$1/provider /etc/chatscripts
ln -sf /etc/diald/providers/$1/ip-up /etc/diald
ln -sf /etc/diald/providers/$1/ip-down /etc/diald
ln -sf /etc/diald/providers/$1/routers /etc/smail
/etc/init.d/diald start


Next Previous Contents
Search Howtos :Match :
Safesquid proxy server 4.2.2.RC8.14B
Antivirus and content filtering proxy server
Thunderbird 2.0.0.18
An email and newsgroup client with powerful, new junk mail controls
JEdit 4.3pre16
Programmers text editor
Gdm 2.24.1
Reimplementation of the well known xdm program.
Damn Small Linux 4.4.10
Damn Small Linux, 50MB bootable Linux desktop LiveCD
PhpMyAdmin 3.1.0 rc1
Php front-end to MySQL administration
ImageMagick 6.4.5.8
ImageMagick image processing studio
KOffice 2.0 beta3
Integrated office suite for KDE
LimeWire 4.18.8
Gnutella Client
Trac 0.11.2.1
Integrates SCM, Wiki and Issue Tracker
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

eWeek

The essential technology information source for builders of e-business.

BusinessWeek (Digital Edition)

Provides readers a deeper understanding of the trends that drive growth, and what best practices keep them ahead of the competition.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info