Verder Terug Inhoud

3. Machine A Specifieke Configuratie

3.1 /etc/cipe/options.machineB



#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.2.1 
# mijn cipe (nep) ip adres 
ipaddr          192.168.1.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) 

3.2 /etc/cipe/options.machineC



#uncomment er 1 hieronder
#naam voor cipe 1.0.x
#device          cip3b1
#naam voor cipe 1.2.x
device          cipcb1


# remote intern (nep) ip adres
ptpaddr         192.168.3.1 
# mijn cipe (nep) ip adres
ipaddr          192.168.1.1 
# my real ip adres and cipe port 
me              (real ip 1):(port B) 
# remote echt ip adres en cipe poort 
peer            (real ip 3):(port B) 
#unieke 128 bit sleutel
key             (Key B)

3.3 /etc/rc.d/rc.cipe



!#/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.machineB options.machineC" 

#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"        #for cipe 1.0 
cipemod="cipcb"        #for 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 
 

3.4 Gateway

Alle machines op network 192.168.1.0 moeten 192.168.1.1 hebben als gateway. Als dat niet zo is zal het niet werken.


Verder Terug Inhoud