Draco - diald config files


/usr/sbin/diald-on

#! /bin/sh

. /usr/local/etc/PPP-private
# this file contains private info, in the following format:
#export PHONE=5551234
#export USER=spade
#export PASSWORD=CoolPWD
#export OUR_IP_ADDR=128.0.0.200
#export THEIR_IP_ADDR=128.0.0.1

export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin/usr/sbin:/bin:/sbin"
/usr/sbin/diald /dev/cua3 -m ppp local $OUR_IP_ADDR \
	 remote $THEIR_IP_ADDR defaultroute modem crtscts \
	 ip-up ppp-up \
	 ip-down ppp-down \
	 fifo /var/adm/diald.ctl \
	 impulse 600,300 \
	 connect-timeout 120 \
	 redial-timeout 5 \
	 connect '/usr/sbin/chat -v \
		ABORT  "NO CARRIER" ABORT BUSY  \
		"" ATZ OK ATS7=50M0L2V1\&C1E1Q0DT$PHONE CONNECT ""  \
		ogin: $USER ssword: \\q$PASSWORD'



/usr/local/sbin/ppp-up

A program or script which is executed when the link is available for sending and receiving IP packets It is executed with the parameters:
interface-name tty-device speed local-IP-address remote-IP-address
and with its standard input, output and error streams redirected to /dev/null.

This program or script is executed with the same real and effective user-ID as pppd, that is, at least the effective user-ID and possibly the real user-ID will be root. This is so that it can be used to manipulate routes, run privileged daemons (e.g. sendmail), etc. Be careful that the contents of the /etc/ppp/ip-up and /etc/ppp/ip-down scripts do not compromise your system's security.

Note that this script has the same function of /etc/ppp/ip-up used with 'raw' PPP.


#! /bin/sh
echo ppp up `date` > /dev/console
# This might be a good place to invoke fetchmail to retreive
# mail from the ISP.
# This is also a good place to fix up routes.

/usr/sbin/ppp-down

A program or script which is executed when the link is no longer available for sending and receiving IP packets. This script can be used for undoing the effects of the /etc/ppp/ip-up script. It is invoked with the same parameters as the ip-up script, and the same security considerations apply, since it is executed with the same effective and real user-IDs as pppd.

Note that this script has the same function of /etc/ppp/ip-up used with 'raw' PPP.

#! /bin/sh
echo ppp going down `date` > /dev/console
# We restart the DNS server, so that the next request for
# an off-site lookup will bring up the link.
/usr/sbin/named.restart


/usr/lib/diald/standard.filter

There is one more important piece of magic. Since I am running a forwarding DNS server, I need to bring up the link when my DNS server attempts to talk to the forwaders. As it comes out of the sources, the standard.filter rules ignore such communication attemts, I comment out this rule.

draco:/usr/local/sbin# cd /usr/local/src/diald-0.16/config
draco:/usr/local/src/diald-0.16/config# diff standard.filter /usr/lib/diald
116c116
< ignore udp udp.dest=udp.domain,udp.source=udp.domain
---
> ### ignore udp udp.dest=udp.domain,udp.source=udp.domain


Index, Back On to IP Masquerade
Copyright ©, 1997, Ben Spade. Permission is given to copy or link to this document, as long as this notice remains intact.