Date: Mon, 15 Feb 1999 23:41:50 +0100 (CET) From: Rene de Vries <rene@canyon.demon.nl> To: freebsd-isdn@FreeBSD.ORG Subject: Re: -current, dial-on-demand, hang up the phone? Message-ID: <199902152241.XAA00703@canyon.demon.nl> In-Reply-To: <m10COGf-0000CQC@hcswork.hcs.de> from Hellmuth Michaelis at "Feb 15, 1999 2:40:56 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Currently I use ipfw (IP_FIREWALL) to prevent sendmail from initiating a isdn connection (I also compiled sendmail without dns and I am using a smart smtp host from my ISP). When the connection comes up for some other reason the firewall rule is simply deleted in some "/etc/isdn/isdn-up" script. This simple system proved out te be very effective! The biggest problem that a filter will have is dns lookups, if you block them, you effectively block auto dialing for anything (most connections start by looking up a host and then connecting...). The only strange effect that I observed is that if you change "deny" (in the ipfw rule) to "unreach host", the connection will still be initiated. I presume that the ICMP package that is send will go via the interface and cause this "wake-up". Rene BTW: here are the important parts from my setup. /etc/rc.firewall: /sbin/ipfw -q add 300 deny tcp from any to any 25 out via ${oif} /etc/isdn/isdnd.rc: regexpr = "ISP outgoing call active" regprog = isdn-up regexpr = "ISP outgoing call disconnected" regprog = isdn-down /etc/isdn/isdn-up: #! /bin/sh /sbin/ipfw -q delete 300 /bin/sleep 10 /usr/sbin/sendmail -q /etc/isdn/isdn-down: #! /bin/sh if ! /sbin/ipfw show 300 2>/dev/null >/dev/null ; then /sbin/ipfw -q add 300 deny tcp from any to any 25 out via isp0 fi > >From the keyboard of Kai.Grossjohann@CS.Uni-Dortmund.DE: > > > I start Emacs at work and let it (X11) display on my home machine. > > I have a dynamic ip address. Thus, when the ISDN thingy hangs up on > > me, the Emacs session is disrupted rather rudely. > > > > Thus, I want the connection to stay open (even if it costs money) > > while I stare at a program started interactively, but I also want the > > ability to hang up the phone when I feel like it. > > What you need are two things: > > 1) a commandline utility, where you can say "hang up the line now" > > 2) a dial filter, which prevents further dial tries. > > Then what you do with it is write two scripts, lets name them "on" and > "off" where on contains something like: > > isdnconnectcontrol hangup > isdndialfilter -installfilter telnet > > to close the connection and prevent further dial retries and where on > contains something like: > > isdndialfilter -deinstallfilter telnet > > Neither isdnconnectcontrol nor isdndialfilter are existent, but a similar > effect should be gained by issuing "ifconfig ispX down" and "ifconfig ispX up". > > hellmuth -- Rene de Vries http://www.tcja.nl/~rene; mailto:rene@tcja.nl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902152241.XAA00703>