#uncomment er 1 hieronder
#naam voor cipe 1.0.x
#device cip3b0
#naam voor cipe 1.2.x
device cipcb0
# remote intern (nep) ip adres
ptpaddr 192.168.1.1
# mijn cipe (nep) ip adres
ipaddr 192.168.3.1
# mijn echte ip adres en cipe poort
me (echt ip 1):(poort A)
# remote echt ip adres en cipe poort
peer (echt ip 2):(poort A)
#unieke 128 bit sleutel
key (Key A)
!#/bin/bash
#rc.cipe 3/29/1999
#Zend vragen of commentaar naar acj@home.com.
#Setup script path
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
#Optie file namen in cipe directory voor cipe interfaces
options="options.machineA"
#Haal automatisch de optie filenamen uit de cipe directory
#options=`/bin/ls /etc/cipe/options.*`
#Uncomment er 1 hieronder voor de cipe module naam
#cipemod="cip3b" #voor cipe 1.0
cipemod="cipcb" #voor cipe 1.2
#Check voor cipe module en laad als dat nog niet gedaan is
grep $cipemod /proc/modules >/dev/null
if [ "$?" = "1" ]; then
echo cipe module laden.
modprobe $cipemod
if [ "$?" = "1" ]; then
echo Error bij het laden van de cipe module...exit
exit
fi
else
echo Cipe module is al geladen.
fi
#Verwijder bestaande cipe interfaces
cipeif=`cat /proc/net/dev | cut -f1 -d: | grep $cipemod`
if [ "$cipeif" != "" ]; then
echo Bestaande cipe interface(s) aan het verwijderen.
for i in $cipeif; do
ifconfig $i down
done
fi
#Setup cipe interfaces
echo -n "De cipe interface(s) aan het instellen: "
for config in $options; do
echo -n $config" "
ciped -o $config
done
echo
echo
#Routes toevoegen voor andere remote netwerken via cipe interface(s)
#route add -net x.x.x.x netmask x.x.x.x gw x.x.x.x
#route naar machine B netwerk
#route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
Alle machines op het 192.168.3.0 netwerk moet 192.168.3.1 als gateway hebben. Anders werkt het niet.