isdn-install BACK .. #!/bin/sh # Dieses Script muss im Kopf angepasst werden, und kann dann die ISDN-Konfiguration automatisch vornehmen. # Es ist aber zwingend erforderlich, das der Kernel bereits die ISDN-Karte unterstuetzt. # ################################################################################ # localmsn=12345678 # Ihre eigene Telefonnummer (MSN) remotemsn=87654321 # Provider Einwahlnummer ohne fuehrende "0"! # z.B. (T-Online): "191011" callbackmsn=876512 # erlaubte Callback-Nr. / bei alle "*" idletime=300 # wenn die Verbindung ungenutzt ist, # wird die Verbindung nach dieser Zeit # (in Sekunden) getrennt MYIPADR="10.0.0.2" # eigene IP-Adresse, 0.0.0.0 fuer dynamische IP ISPIPADR="10.0.0.3" # IP-Adresse des Einwahl-Rechners beim Provider DNS1=200.77.111.24 # 1.DNS-Server (Nameserver) DNS2=200.77.222.1 # 2.DNS-Server (Nameserver) myauthproto="chap" # Auth.-Protokoll: pap chap loginname="login" # Benutzername, Login passwort="geheim" # Passwort, Kennwort # # Diese Datei sollte als root ausgefuehrt werden! # Es sollte der neu compilierte Kernel mit ISDN-Unterstuetzung laufen! # KERNEL ==> "fbsdkernel" # # # ISDN einrichten in FreeBSD 4.2 ! # clear # echo "Es werden Die Geraetedateien fuer die ISDN-Karte generiert." cd /dev ./MAKEDEV all ############ /etc/rc.conf ##################################################### echo "Die Datei /etc/rc.conf wird ergaenzt." mv /etc/rc.conf /etc/rc.conf.original cat /etc/rc.conf.original \ | grep -v spppconfig_isp0 \ | grep -v ifconfig_isp0 \ | grep -v defaultrouter \ | grep -v gateway_enable \ | grep -v isdn_enable \ | grep -v isdn_trace \ | grep -v isdn_fsdev > /etc/rc.conf.noisdn cp /etc/rc.conf.noisdn /etc/rc.conf echo "natd_program=\"/sbin/natd\"" >> /etc/rc.conf echo "natd_enable=\"YES\"" >> /etc/rc.conf echo "natd_interface=\"isp0\"" >> /etc/rc.conf echo "natd_flags=\"-dynamic\"" >> /etc/rc.conf echo "spppconfig_isp0=\"myauthproto=$myauthproto myauthname=$loginname \ myauthsecret=$passwort hisauthproto=none callin\" " >> /etc/rc.conf echo "ifconfig_isp0=\"inet $MYIPADR $ISPIPADR \ netmask 255.255.255.255 link1 debug\"" >> /etc/rc.conf echo "defaultrouter=$ISPIPADR" >> /etc/rc.conf echo "gateway_enable=\"YES\"" >> /etc/rc.conf echo "isdn_enable=\"YES\"" >> /etc/rc.conf echo "isdn_trace=\"YES\"" >> /etc/rc.conf echo "isdn_fsdev=\"/dev/ttyv7\" " >> /etc/rc.conf ############ /etc/ttys ######################################################## echo "Die Datei /etc/ttys wird in Zeile 41 angepasst." mv /etc/ttys /etc/ttys.original head -n 40 /etc/ttys.original > /etc/ttys echo "ttyv7 \"/usr/libexec/getty Pc\" cons25 off secure " >> /etc/tty s head -n 305 /etc/ttys.original | tail -n 264 >> /etc/ttys ############ /etc/isdn/isdnd.rc ############################################### echo "Die Datei /etc/isdn/isdnd.rc wird erstellt." echo "#=================================================================\ =============" > /etc/isdn/isdnd.rc echo "# SYSTEM section: isdnd global configuration parameters" >> \ /etc/isdn/isdnd.rc echo "#=================================================================\ =============" >> /etc/isdn/isdnd.rc echo "system" >> /etc/isdn/isdnd.rc echo "#" >> /etc/isdn/isdnd.rc echo "# accounting" >> /etc/isdn/isdnd.rc echo "# ----------" >> /etc/isdn/isdnd.rc echo "acctall = on \ # generate info for everything" >> /etc/isdn/isdnd.rc echo "acctfile = /var/log/isdnd.acct \ # name & location of accounting file" >> /etc/isdn/isdnd.rc echo "useacctfile = yes \ # generate accouting info to file" >> /etc/isdn/isdnd.rc echo "#" >> /etc/isdn/isdnd.rc echo "# monitor" >> /etc/isdn/isdnd.rc echo "# -------" >> /etc/isdn/isdnd.rc echo "monitor-allowed = no \ # global switch: monitor on/off" >> /etc/isdn/isdnd.rc echo "#" >> /etc/isdn/isdnd.rc echo "# ratesfile" >> /etc/isdn/isdnd.rc echo "# ---------" >> /etc/isdn/isdnd.rc echo "ratesfile = /etc/isdn/isdnd.rates.D\ # name & location of rates file" >> /etc/isdn/isdnd.rc echo "#" >> /etc/isdn/isdnd.rc echo "# realtime priority section" >> /etc/isdn/isdnd.rc echo "# -------------------------" >> /etc/isdn/isdnd.rc echo "rtprio = 25 \ # modify isdnd's process priority" >> /etc/isdn/isdnd.rc echo "#" >> /etc/isdn/isdnd.rc echo "#=============================================\ =================================" >> /etc/isdn/isdnd.rc echo "# entry section: PPP example" >> /etc/isdn/isdnd.rc echo "#=============================================\ =================================" >> /etc/isdn/isdnd.rc echo "entry" >> /etc/isdn/isdnd.rc echo "name = I4BPPP" >> /etc/isdn/isdnd.rc echo "usrdevicename = isp" >> /etc/isdn/isdnd.rc echo "usrdeviceunit = 0" >> /etc/isdn/isdnd.rc echo "isdncontroller = 0" >> /etc/isdn/isdnd.rc echo "isdnchannel = -1" >> /etc/isdn/isdnd.rc echo "local-phone-incoming = $localmsn \ # Ihre eigene Telefonnummer (MSN)" >> /etc/isdn/isdnd.rc echo "remote-phone-incoming = $callbackmsn \ # oder "*", fuer jeder" >> /etc/isdn/isdnd.rc echo "local-phone-dialout = $localmsn \ # Ihre eigene Telefonnummer (MSN)" >> /etc/isdn/isdnd.rc echo "remote-phone-dialout = $remotemsn \ # Provider Einwahlnummer" >> /etc/isdn/isdnd.rc echo "remdial-handling = first" >> /etc/isdn/isdnd.rc echo "dialin-reaction = reject" >> /etc/isdn/isdnd.rc echo "dialout-type = normal" >> /etc/isdn/isdnd.rc echo "b1protocol = hdlc" >> /etc/isdn/isdnd.rc echo "idletime-incoming = 240" >> /etc/isdn/isdnd.rc echo "idletime-outgoing = $idletime" >> /etc/isdn/isdnd.rc echo "ratetype = 0" >> /etc/isdn/isdnd.rc echo "unitlength = 90 \ # Telefoneinheitenlaenge in" >> /etc/isdn/isdnd.rc echo " \ # Sekunden, wird hier definiert" >> /etc/isdn/isdnd.rc echo "unitlengthsrc = conf \ # Telefoneinheitenlaenge wird" >> /etc/isdn/isdnd.rc echo " \ # hier konfiguriert" >> /etc/isdn/isdnd.rc echo "dialretries = 3" >> /etc/isdn/isdnd.rc echo "dialrandincr = on" >> /etc/isdn/isdnd.rc echo "recoverytime = 25" >> /etc/isdn/isdnd.rc echo "usedown = off" >> /etc/isdn/isdnd.rc echo "downtries = 2" >> /etc/isdn/isdnd.rc echo "downtime = 30" >> /etc/isdn/isdnd.rc echo "#connectprog = "ip-up" \ # run /etc/isdn/ip-up when an interface" >> /etc/isdn/isdnd.rc echo " \ # has established its network connection." >> /etc/isdn/isdnd.rc echo " \ # example parameters are:" >> /etc/isdn/isdnd.rc echo " \ # /etc/isdn/ip-up -d isp0 -f up -a 192.110.12.14" >> /etc/isdn/isdnd.rc echo "#disconnectprog = "ip-down" \ # like connectprog, but run after the connection" >> /etc/isdn/isdnd.rc echo " \ # is closed (ISDN layer down). The actual" >> /etc/isdn/isdnd.rc echo " \ # interface address might not be known" >> /etc/isdn/isdnd.rc echo " \ # any more. example parameters are:" >> /etc/isdn/isdnd.rc echo " \ # /etc/isdn/ip-up -d isp0 -f down -a 0.0.0.0" >> /etc/isdn/isdnd.rc echo "# EOF ###############################################\ ##########################" >> /etc/isdn/isdnd.rc # # ############ /etc/resolv.conf ################################################# echo "Die Nameserver werden eingetragen." echo " " >> /etc/resolv.conf mv /etc/resolv.conf /etc/resolv.conf.original cat /etc/resolv.conf.original \ grep -v "# 1. DNS-Server des ISDN-ISP" \ grep -v "# 2. DNS-Server des ISDN-ISP" > /etc/resolv.conf echo "nameserver $DNS1 # 1. DNS-Server des ISDN-ISP" >> /etc/resolv.conf echo "nameserver $DNS2 # 2. DNS-Server des ISDN-ISP" >> /etc/resolv.conf # # ############ HINWEISE ######################################################### echo "Nach einem Neustart sollten Sie auf der Konsole \"F8\" " echo "den Status der ISDN-Verbindungen und alle Aktivitaeten " echo "auf dem S0-Bus sehen koennen." # [IMG]