From owner-freebsd-questions Mon Jul 31 2:51:30 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fmdb.c3.hu (dial-055.digitel2002.hu [213.163.2.55]) by hub.freebsd.org (Postfix) with SMTP id AE5C237BBD8 for ; Mon, 31 Jul 2000 02:51:17 -0700 (PDT) (envelope-from mico@bsd.hu) Received: (qmail 916 invoked by uid 1004); 31 Jul 2000 06:34:12 -0000 From: "Miklos Niedermayer" Date: Mon, 31 Jul 2000 08:34:12 +0200 To: Jens Sauer Cc: freebsd-isdn@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: Where to put a command? Message-ID: <20000731083412.A895@bsd.hu> Mail-Followup-To: Niedermayer Miklos , Jens Sauer , freebsd-isdn@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG References: <20000731011642.8FD6137B8C8@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000731011642.8FD6137B8C8@hub.freebsd.org>; from pirol9999@gmx.net on Mon, Jul 31, 2000 at 03:18:49AM +0200 X-Operating-System: FreeBSD 4.0 - The Power to Serve Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, Jens Sauer: > can anybody tell me, where to put a command, > that shall be executed every time my ISDN-Card > dials out again ("on demand" - and gets a new IP-address). > I have to refresh my firewall-rules at every > change of the outside-ip-address If you are using user-level PPP, you can use its ppp.linkup features, otherwise man isdnd.rc: connectprog specifies a program run everytime after a connec- tion is established and address negotiation is complete (i.e.: the connection is useable). Isdnd expects to find the program below the path /etc/isdn which is prepended to the string speci- fied as a parameter to this keyword. The programs specified by connect and disconnect will get the following command line arguments: -d (device) -f (flag) [ -a (addr) ] where device is the name of device, e.g. "isp0", flag will be "up" if connec- tion just got up, or "down" if interface changed to down state and addr the address that got as- signed to the interface as a dotted-quad ip ad- dress (optional, only if it can be figured out by isdnd). (optional) If you are dealing with the packet filter you should deal with it a bit more, it would be better if it wouldn't need refresh every time. You should specify your tun0 or isp0 interface, not their IP address. If you are using user-level PPP, please take a look at its filtering features. Good luck. -- ______ o _. __ / / / (_(_(__(_) @ bsd.hu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message