From owner-freebsd-isdn Fri Apr 10 23:38:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA14383 for freebsd-isdn-outgoing; Fri, 10 Apr 1998 23:38:12 -0700 (PDT) (envelope-from owner-freebsd-isdn@FreeBSD.ORG) Received: from uni-sb.de (uni-sb.de [134.96.252.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA14372 for ; Fri, 10 Apr 1998 23:38:05 -0700 (PDT) (envelope-from rock@cs.uni-sb.de) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31]) by uni-sb.de (8.8.8/98010601) with ESMTP id IAA06622; Sat, 11 Apr 1998 08:38:01 +0200 (CEST) Received: from cs.uni-sb.de (acc2-223.telip.uni-sb.de [134.96.112.223]) by cs.uni-sb.de (8.8.8/1998022700) with ESMTP id IAA29696; Sat, 11 Apr 1998 08:38:00 +0200 (CEST) Message-ID: <352F0FA0.97AB9019@cs.uni-sb.de> Date: Sat, 11 Apr 1998 08:37:20 +0200 From: "D. Rock" X-Mailer: Mozilla 4.05 [en] (X11; I; SunOS 5.6 i86pc) MIME-Version: 1.0 To: Arve Ronning CC: freebsd-isdn@FreeBSD.ORG Subject: Re: I4B & NAT References: <352C2290.6FD4@ah.telia.no> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Arve Ronning wrote: > > Trying to build a router/gateway between my privat Ethernet and > the Internet (via my ISP), I have problems with I4B or NAT (I think:). > > The 2.2.5-R kernel with options IPFIREWALL and IPDIVERT works fine > with ISDN4BSD 0.50-alpha and firewall rule 'pass all from any to any'. > However, when I add 'divert natd all from any to any via isppp0' > and start natd, name server lookups to the ISP's NS don't work. > > Also, ping and nslookup fails from any other internal host. I had exactly the same problems. natd doesn't seem to get a message if the IP address of the interface changes (after successful dialout). I have to manually send a HUP signal to natd. I do this via the following (ugly?!) hack: I added the following two lines to the system section of isdnd.rc: regexpr = "call active" # look for matches in log messages regprog = hup_natd # execute program whan match is found The small script "hup_natd", located in /etc/isdn, looks like: #!/bin/sh pid=`cat /var/run/natd.pid` kill -HUP $pid sleep 3 kill -HUP $pid sleep 5 kill -HUP $pid It looks ugly, but at least for me it works. The two sleeps are necessary since I have to wait for ppp negotiation to complete (I don't get a message from isdnd for that). If I'm lucky I have my connection after 3 seconds, but 8 seconds should suffice for worst case (the first HUP without a sleep sometimes even succeeded on an slow 486/33 with 8MB RAM, more HUPs don't hurt). I'm really interested in some more elegant method. Daniel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message