#!/bin/sh # Instructions: read the comments for each command, and if necessary, edit # the command (e.g. replace EAZ with your real EAZ or MSN). Look for lines # marked with XXX_, which is probably all you need to change. # If the command is commented out, remove the leading '#' to enable it if # the command is needed. # If using dynamic IP addresses: # Check out the /etc/ppp/ip-up.d/isdnutils and /etc/ppp/ip-down.d/isdnutils # scripts, to ensure that any routing is done correctly there (the # ip-up.d/isdnutils script is run after a syncPPP link is established, and the # ip-down.d/isdnutils script is run after the link goes down). # You need to have the ppp package installed for those scripts to work. set -e # exit on _any_ error # Get the device name device=ippp0 # The (dummy) IP addresses # # Use 10.0.0.1 for LOCALIP and 10.0.0.2 for REMOTEIP if you have # dynamic IP addresses; with static address fill in the real values! LOCALIP=192.168.1.200 REMOTEIP=192.168.1.201 # Configuration (start) case "$1" in start) # If running kernel 2.0.31 or higher, enable the IP dynamic hack # (if needed). See linux/Documentation/networking/ip_dynaddr.txt . # Default is: enabled. If you have static IP numbers, you can remove # the next line. [ -f /proc/sys/net/ipv4/ip_dynaddr ] && echo 5 > /proc/sys/net/ipv4/ip_dynaddr # First you need to create the interface(s) isdnctrl readconf /etc/isdn/device.conf # verbose num # Set verbosity level to . # (2 shows the first package of every connection, that is very useful.) # WARNING: this is a global parameter, that affects all isdn devices! isdnctrl verbose 2 ifconfig ${device} $LOCALIP pointopoint $REMOTEIP netmask 255.255.255.255 set +e # ignore errors from here on route del -host $REMOTEIP ${device} 2>/dev/null route add -host $REMOTEIP ${device} # setting default route here is only useful if this is your only # outside connection... The default is ippp0 for the default route. route del default 2>/dev/null route add default netmask 0 ${device} ;; # Delete the interface stop) set +e # ignore errors from here on isdnctrl dialmode $device off >/dev/null 2>&1 # Commands to undo the network stuff route del $REMOTEIP $device 2> /dev/null # only delete default route if set above! # The default is to use ippp0 for your default route. route del default netmask 0 2> /dev/null ifconfig $device down 2> /dev/null isdnctrl delif $device 2> /dev/null # If this was the master device, # the delif will also have removed the slaves. ;; # the rest is generic, don't touch *) echo "Usage: $0 {start|stop}" exit 1 ;; esac exit 0