Seyer
24.10.01, 16:55
Ich habe folgendes Problem, seitdem ich auf SuSE Linux 7.3 (von 7.2) gewechselt habe.
Ich habe einen Router, der für die Clients die Internet-Verbindung über T-DSL herstellt. Hierfür benutze ich PPPoE (Kernel) und für das Masquerading und Firewall SuSEfirewall2.
Nach 24 Stunden kappt die Telekom bekanntlich die Leitung, so dass sich PPPoE neu einwählen muss.
Leider klappt entweder dies nicht, oder der Firewall kommt damit nicht zurecht. Ein Neustart von von PPPoE (rcPPPoE restart, selbstgeschriebenes Script) und SuSEfirewall2 (rcSuSEfirewall2 restart)behebt das Problem. Ein Versuch, diese beiden Befehle in die Crontab zu schreiben, scheitern.
Hier ein paar Config.Dateien:
[/etc/ppp/options]
plugin /usr/lib/pppd/2.4.1/pppoe.so
demand
connect /bin/true
ipcp-accept-remote
ipcp-accept-local
usepeerdns
idle 90000
noipdefault
defaultroute
user "XXX@t-online.de"
hide-password
noaccomp
nopcomp
novj
novjccomp
nobsdcomp
nodeflate
noccp
nocrtscts
local
noauth
mru 1492
mtu 1492
lcp-echo-interval 10
lcp-echo-failure 3
lock
[/etc/rc.config.d/firewall2.rc.config]
FW_DEV_EXT="ppp0"
FW_DEV_INT="eth0"
FW_DEV_DMZ=""
FW_ROUTE="yes"
FW_MASQUERADE="yes"
FW_MASQ_DEV="$FW_DEV_EXT"
FW_MASQ_NETS="192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.99"
FW_PROTECT_FROM_INTERNAL="no"
FW_AUTOPROTECT_SERVICES="yes"
FW_SERVICES_EXT_TCP=""
FW_SERVICES_EXT_UDP=""
FW_SERVICES_EXT_IP=""
FW_SERVICES_DMZ_TCP=""
FW_SERVICES_DMZ_UDP=""
FW_SERVICES_DMZ_IP=""
FW_SERVICES_INT_TCP=""
FW_SERVICES_INT_UDP=""
FW_SERVICES_INT_IP=""
FW_TRUSTED_NETS="192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.99"
FW_ALLOW_INCOMING_HIGHPORTS_TCP="yes"
FW_ALLOW_INCOMING_HIGHPORTS_UDP="yes"
FW_SERVICE_AUTODETECT="yes"
FW_SERVICE_DNS="yes"
FW_SERVICE_DHCLIENT="no"
FW_SERVICE_DHCPD="yes"
FW_SERVICE_SQUID="yes"
FW_SERVICE_SAMBA="yes"
FW_FORWARD=""
FW_FORWARD_MASQ=""
FW_REDIRECT=""
FW_LOG_DROP_CRIT="yes"
FW_LOG_DROP_ALL="no"
FW_LOG_ACCEPT_CRIT="yes"
FW_LOG_ACCEPT_ALL="no"
FW_LOG="--log-level warning --log-tcp-options --log-ip-option --log-prefix SuSE-FW"
FW_KERNEL_SECURITY="yes"
FW_STOP_KEEP_ROUTING_STATE="no"
FW_ALLOW_PING_FW="yes"
FW_ALLOW_PING_DMZ="yes"
FW_ALLOW_PING_EXT="yes"
FW_ALLOW_FW_TRACEROUTE="yes"
FW_ALLOW_FW_SOURCEQUENCH="yes"
FW_ALLOW_FW_BROADCAST="no"
FW_IGNORE_FW_BROADCAST="yes"
FW_ALLOW_CLASS_ROUTING="no"
[/etc/pppoed.conf]
interface = "eth1"
user = "XXX@t-online.de"
password = "XXX"
demand = "yes"
idle = "90000"
dns1 = "217.5.115.7"
dns2 = "194.25.2.129"
[/etc/init.d/PPPoE] Start-Script
. /etc/rc.config
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
test $link = $base && START_ADSL=yes
test "$START_ADSL" = yes || exit 0
PPPD=/usr/sbin/pppd
return=$rc_done
case "$1" in
start)
echo -n "Starting ADSL"
startproc $PPPD $ADSL_DEVICE || return=$rc_failed
echo -e "$return"
;;
stop)
echo -n "Shutting down ADSL"
killproc -TERM $PPPD || return=$rc_failed
echo -e "$return"
;;
restart)
$0 stop && $0 start || return=$rc_failed
;;
reload)
echo -n "Reload service ADSL"
killproc -HUP $PPPD || return=$rc_failed
echo -e "$return"
;;
status)
echo -n "Checking for service ADSL: "
checkproc $PPPD && echo OK || echo No process
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
test "$return" = "$rc_done" || exit 1
exit 0
[/etc/crontab]
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
48 5 * * * root netdate ptbtime1.ptb.de ptbtime2.ptb.de > /dev/null
49 5 * * * root hwclock --systohc > /dev/null
50 5 * * * root make -s -C /var/yp > /dev/null
51 5 * * * root rcPPPoE restart > /dev/null
52 5 * * * root rcSuSEfirewall2 restart > /dev/null
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
14 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily
29 0 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
44 0 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
Ich habe einen Router, der für die Clients die Internet-Verbindung über T-DSL herstellt. Hierfür benutze ich PPPoE (Kernel) und für das Masquerading und Firewall SuSEfirewall2.
Nach 24 Stunden kappt die Telekom bekanntlich die Leitung, so dass sich PPPoE neu einwählen muss.
Leider klappt entweder dies nicht, oder der Firewall kommt damit nicht zurecht. Ein Neustart von von PPPoE (rcPPPoE restart, selbstgeschriebenes Script) und SuSEfirewall2 (rcSuSEfirewall2 restart)behebt das Problem. Ein Versuch, diese beiden Befehle in die Crontab zu schreiben, scheitern.
Hier ein paar Config.Dateien:
[/etc/ppp/options]
plugin /usr/lib/pppd/2.4.1/pppoe.so
demand
connect /bin/true
ipcp-accept-remote
ipcp-accept-local
usepeerdns
idle 90000
noipdefault
defaultroute
user "XXX@t-online.de"
hide-password
noaccomp
nopcomp
novj
novjccomp
nobsdcomp
nodeflate
noccp
nocrtscts
local
noauth
mru 1492
mtu 1492
lcp-echo-interval 10
lcp-echo-failure 3
lock
[/etc/rc.config.d/firewall2.rc.config]
FW_DEV_EXT="ppp0"
FW_DEV_INT="eth0"
FW_DEV_DMZ=""
FW_ROUTE="yes"
FW_MASQUERADE="yes"
FW_MASQ_DEV="$FW_DEV_EXT"
FW_MASQ_NETS="192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.99"
FW_PROTECT_FROM_INTERNAL="no"
FW_AUTOPROTECT_SERVICES="yes"
FW_SERVICES_EXT_TCP=""
FW_SERVICES_EXT_UDP=""
FW_SERVICES_EXT_IP=""
FW_SERVICES_DMZ_TCP=""
FW_SERVICES_DMZ_UDP=""
FW_SERVICES_DMZ_IP=""
FW_SERVICES_INT_TCP=""
FW_SERVICES_INT_UDP=""
FW_SERVICES_INT_IP=""
FW_TRUSTED_NETS="192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.99"
FW_ALLOW_INCOMING_HIGHPORTS_TCP="yes"
FW_ALLOW_INCOMING_HIGHPORTS_UDP="yes"
FW_SERVICE_AUTODETECT="yes"
FW_SERVICE_DNS="yes"
FW_SERVICE_DHCLIENT="no"
FW_SERVICE_DHCPD="yes"
FW_SERVICE_SQUID="yes"
FW_SERVICE_SAMBA="yes"
FW_FORWARD=""
FW_FORWARD_MASQ=""
FW_REDIRECT=""
FW_LOG_DROP_CRIT="yes"
FW_LOG_DROP_ALL="no"
FW_LOG_ACCEPT_CRIT="yes"
FW_LOG_ACCEPT_ALL="no"
FW_LOG="--log-level warning --log-tcp-options --log-ip-option --log-prefix SuSE-FW"
FW_KERNEL_SECURITY="yes"
FW_STOP_KEEP_ROUTING_STATE="no"
FW_ALLOW_PING_FW="yes"
FW_ALLOW_PING_DMZ="yes"
FW_ALLOW_PING_EXT="yes"
FW_ALLOW_FW_TRACEROUTE="yes"
FW_ALLOW_FW_SOURCEQUENCH="yes"
FW_ALLOW_FW_BROADCAST="no"
FW_IGNORE_FW_BROADCAST="yes"
FW_ALLOW_CLASS_ROUTING="no"
[/etc/pppoed.conf]
interface = "eth1"
user = "XXX@t-online.de"
password = "XXX"
demand = "yes"
idle = "90000"
dns1 = "217.5.115.7"
dns2 = "194.25.2.129"
[/etc/init.d/PPPoE] Start-Script
. /etc/rc.config
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
test $link = $base && START_ADSL=yes
test "$START_ADSL" = yes || exit 0
PPPD=/usr/sbin/pppd
return=$rc_done
case "$1" in
start)
echo -n "Starting ADSL"
startproc $PPPD $ADSL_DEVICE || return=$rc_failed
echo -e "$return"
;;
stop)
echo -n "Shutting down ADSL"
killproc -TERM $PPPD || return=$rc_failed
echo -e "$return"
;;
restart)
$0 stop && $0 start || return=$rc_failed
;;
reload)
echo -n "Reload service ADSL"
killproc -HUP $PPPD || return=$rc_failed
echo -e "$return"
;;
status)
echo -n "Checking for service ADSL: "
checkproc $PPPD && echo OK || echo No process
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
test "$return" = "$rc_done" || exit 1
exit 0
[/etc/crontab]
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
48 5 * * * root netdate ptbtime1.ptb.de ptbtime2.ptb.de > /dev/null
49 5 * * * root hwclock --systohc > /dev/null
50 5 * * * root make -s -C /var/yp > /dev/null
51 5 * * * root rcPPPoE restart > /dev/null
52 5 * * * root rcSuSEfirewall2 restart > /dev/null
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
14 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily
29 0 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
44 0 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly