View previous topic :: View next topic |
Author |
Message |
wdconinc Tux's lil' helper
Joined: 17 Jan 2003 Posts: 80 Location: Ann Arbor, Michigan
|
Posted: Tue Feb 25, 2003 10:38 pm Post subject: VPN causes problems in Metalog? |
|
|
Hi all,
I use VPN to connect to the internet. This is done with pptp and mppe. And it works! I wrote my own init-script to load it on bootup
The problem is that after a while (let's say 6 hours, but I have noticed no connection of my problem with uptime) my connection fails, and I can't login anymore.
I think the problem might be connected to metalog, because logging stops at about the same time... Of course it could be the other way round, but then the question is: why does metalog give up?
More specific info:
- No internet means: I can ping my local subnet, I can ping my VPN router, I cannot ping anything outside (at least not using url's, maybe with ip's it works, I did not test that, it might be only a DNS-related problem)
- I can't login means: 'su' asks for a password (as usual), I type the password and it locks (no high cpu-use or any other anomalies). Logging in at console doesn't work for normal users or superuser (typing password and after 60 seconds I get a time-out message)
- My init-script is in /etc/init.d/net.ppp0. When the problem occurs, 'net.ppp0 status' prints "* net.ppp0: started" but it locks (ctrl-C helps). This does not occur with other init-scripts. My init-script doesn't provide any status () function that could make it crash.
- Logging with metalog in asynchronous mode (yes, I should do this different for this line to make any sense, but my system isn't thAt loaded, so it is actually quite synchronous): I am logging a lot to /dev/tty10, when the problem occurs no further output is written there (even not the regular cron-loglines).
Thanks if you can help me, because I have absolutely no idea what the problem is or even what it can be!
greetz
Wouter
Metalog uses standard config (with in /etc/conf.d/metalog the option "-B").
PAM (if the problem would be in authentication) is still in freshly emerged shape.
My init-script for VPN-connection (sorry for your precious screenspace):
(the scripts post-eth0 and post-ppp0 do some routing stuff, only using /sbin/route)
Code: |
#!/sbin/runscript
# Copyright 2003 Wouter Deconinck
# Heavily based on net.ppp0, by Gentoo Technologies, Inc.
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Martin Schlemmer <azarah@gentoo.org>
# Credits: To all those I got ideas from :)
#
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/net.ppp0,v 1.5 2002/08/25 07:58:54 azarah Exp $
# NB: Config is in /etc/conf.d/net.$IFACE
# Misc internal variables
CMD_LINE=""
FUNCT="${2}"
depend() {
need net.eth0 logger post-eth0
}
checkconfig() {
if [ ! -x "`which pppd`" ] || [ ! -x "`which chat`" ] ; then
eerror "pppd and chat needs to be installed"
return 1
fi
if [ -e "/var/run/${IFACE}.pid" ] && [ "${FUNCT}" = "start" ] ; then
eerror "ppp0 is already up"
return 1
fi
if [ ! -e "/var/run/${IFACE}.pid" ] && [ "${FUNCT}" = "stop" ] ; then
eerror "ppp0 not up"
# Do our own cleanup
if [ -L ${svcdir}/started/net.${IFACE} ] ; then
rm -f ${svcdir}/started/net.${IFACE}
fi
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Bringing ${IFACE} up"
if [ -x "`which pppd`" ]; then
export SUBNET=`/sbin/ifconfig eth0 | /bin/sed -n '2p' | /usr/bin/cut -d: -f2 | /usr/bin/cut -d. -f1-3`
local count=0
echo " Contacting VPN-Server..."
/usr/sbin/pptp-command start RUGnet >/dev/null
if [ "`echo \`eval ifconfig \$\{IFACE\} | grep UP | grep RUNNING\``" ] ; then
echo " IP Address: `/sbin/ifconfig ${IFACE} | /bin/sed -n '2p' | /usr/bin/cut -d: -f2 | /usr/bin/cut -d. -f1-4 | /usr/bin/cut -dP -f1`"
else
echo " No connection"
fi
fi
eend
}
stop() {
checkconfig || return 1
ebegin "Bringing ${IFACE} down"
if [ -x "`which ifconfig`" ]; then
if [ ! "`/sbin/ifconfig |grep ${IFACE}`" ] ; then
eerror "Interface seems to be down already"
return 1
fi
echo -n " "
/usr/sbin/pptp-command stop
if [ -e "/var/run/${IFACE}.pid" ] ; then
kill "`cat /var/run/${IFACE}.pid |grep -v ${DEVICE}`"
fi
export SUBNET=`/sbin/ifconfig eth0 | /bin/sed -n '2p' | /usr/bin/cut -d: -f2 | /usr/bin/cut -d. -f1-3`
fi
eend
}
|
Oh yeah, one last thing: yes, I know that you have to be in the wheel group to 'su' to root, so please don't remind me of that... |
|
Back to top |
|
|
wdconinc Tux's lil' helper
Joined: 17 Jan 2003 Posts: 80 Location: Ann Arbor, Michigan
|
Posted: Mon Mar 10, 2003 4:32 pm Post subject: |
|
|
Hello,
Problem not yet solved, but I tracked it down to a more basic level. Problem is the same as in https://forums.gentoo.org/viewtopic.php?t=13375.
I'll put any further posts in that thread.
greets
wouter |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|