[IOML] A Question!!

Simon Slaytor sslaytor at iom.com
Thu Jun 10 12:47:44 BST 2004


Hi Chaps,

Now don't get too excited but I have a technical question for you.

I've built a dial on demand firewall using Fedora Core 1 and an external
ISDN T/A on comm1.

To get the system to demand dial I've used wvdial (v1.5.3) as a chat
replacement with pppd (v2.4.1).

I've created a wvdial profile called DOD and start pppd from the cl by
executing 'pppd call DOD', pppd now starts and sits waiting.

I've got an iptables policy running that NAT's the internal network via
the ppp0 interface created by pppd.

Connecting from a client causes pppd to dial and I can connect to the
net, cool! The system then disconnects after the idle time.

So where's the problem I hear you ask, well!

If I leave the system running over night the next day when I try to
connect to the net from my client PC I don't get a connection.

Grepping pppd shows it's still there and running, loooking through the
syslog shows that it's trying to dial but fails with a 'Connection
script failure' extract as follows:

Jun 10 11:40:58 CLI-FW6 pppd[15548]: Starting link
Jun 10 11:41:04 CLI-FW6 pppd[15548]: Connect script failed

If I kill the pppd process and relaunch with pppd call DOD I'm back in
business until tomorrow.

I've tried creating a small script that I can run with cron to kill and
relauch pppd on a daily basis but whilst this works it dosn't solve the
problem. Script as follows:

#!/bin/sh
#
# Shell will test if PPPD is running, checks for ppp0 interface
# if running stops the process by calling ppp-off it then checks for the
# ppp0 interface to disappear and restarts PPPD
#
 
# Check if ppp0 exists i.e. pppd running

if test -r /proc/sys/net/ipv4/conf/ppp0
then
logger -p 6 "****** ppp0 interface exists pppd is running"

/etc/ppp-off

        logger -p 6 "****** Waiting for pppd shutdown"
        while test -r /proc/sys/net/ipv4/conf/ppp0
        do
        echo -e "*\c"
        done
                                                                                                    
else
logger -p 6 "****** ppp0 interface is not present pppd is down"
fi

logger -p 6 "****** Starting pppd "
pppd call dod


Syslog :

Jun 10 04:02:03 CLI-FW6 logger: ****** ppp0 interface exists pppd is
running
Jun 10 04:02:03 CLI-FW6 pppd[15043]: Terminating on signal 2.
Jun 10 04:02:03 CLI-FW6 logger: ****** Waiting for pppd shutdown
Jun 10 04:02:04 CLI-FW6 pppd[15043]: Exit.
Jun 10 04:02:05 CLI-FW6 logger: ****** Starting pppd
Jun 10 04:02:05 CLI-FW6 pppd[15548]: pppd 2.4.1 started by root, uid 0
Jun 10 04:02:05 CLI-FW6 pppd[15548]: Using interface ppp0
Jun 10 04:02:05 CLI-FW6 pppd[15548]: local  IP address 10.64.64.64
Jun 10 04:02:05 CLI-FW6 pppd[15548]: remote IP address 10.112.112.112
Jun 10 11:40:58 CLI-FW6 pppd[15548]: Starting link
Jun 10 11:41:04 CLI-FW6 pppd[15548]: Connect script failed

If I run this script manually in the morning it DOES fix the problem.

Anyone any clues as the whats happening?








More information about the IOM mailing list