On demand ppp dialup connection for Redhat 7.2 & Sendmail
If you have done a full install upon installing
redhat then skip to the next section, if not read on.
You need to have the following installed.
ppp
wvdial
rpm -iv ppp-2.4.1-8.i386.rpm
(get from www.rpmfind.net)
rpm -iv wvdial-1.42.1386.rpm (get from www.rpmfind.net)
Okay this has now installed them, first of all
we need to add a dial profile to wvdial.conf
cd /etc
vi wvdial.conf
add the following
[Modem 0]
Modem =
/dev/ttys1
(Please remember to set ttys0 for com1 ttys1 for com2)
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0
[Dialer Defaults]
Modem =
/dev/ttys1
(Please remember to set ttys0 for com1 ttys1 for com2)
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0
[Dialer mweb]
Username = cgrigor
Password = password
Phone = 2833000
Dial Prefix =
0
(If you need to dial an outside line put the prefix in here)
Area Code = 011
Inherits = Dialer Defaults
Stupid Mode = 0
Okay save this file and then we move on
.........
Right now open up the following:
cd /etc/sysconfig/network-scripts
vi ifcfg-ppp0
The contents of this file should be as follows:
WVDIALSELECT=mweb
MODEMPORT=/dev/ttys0 (Please remember to set ttys0
for com1 ttys1 for com2)
LINESPEED=115200
PAPNAME=cgrigor
(This is the same uid that you used in wvdial.conf)
USERCTL=TRUE
ONBOOT=NO
PERSIST=NO
DNS1=196.2.16.3
DEFROUTE=YES
(This makes the box the gateway)
PEERDNS=yes
DEMAND=yes
(This makes the interface demand dial)
IDLETIMEOUT=120
(120 secs before disconnect)
Okay save this file ....
Right now you should be able to run the
following:
ppp-watch ppp0 &
this will bring up the ppp0 interface and wait for outbound traffic before
bringing the line up...
and that is that on the dialing side....
Next comes Sendmail....
By default you should have sendmail installed
but just incase you have not go get it
www.rpmfind.net
rpm -iv sendmail-8.11.6-3.i386.rpm
cd /etc/mail/
vi sendmail.mc
add the following
FEATURE(`accept_unresolvable_domains')dnl
FETAURE(`accept_unqualified_senders')dnl
now run m4 /etc/sendmail.mc > /etc/sendmail.cf
Uh havent finished this doc... but will keep you posted
------------ Thanks to Chris Grigor for this document ;-)
|