From owner-freebsd-questions Fri May 22 21:01:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA25366 for freebsd-questions-outgoing; Fri, 22 May 1998 21:01:53 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from awfulhak.org (awfulhak.force9.co.uk [195.166.136.63]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA25357 for ; Fri, 22 May 1998 21:01:44 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from gate.lan.awfulhak.org (localhost [127.0.0.1]) by awfulhak.org (8.8.8/8.8.8) with ESMTP id CAA13556; Sat, 23 May 1998 02:55:37 +0100 (BST) (envelope-from brian@gate.lan.awfulhak.org) Message-Id: <199805230155.CAA13556@awfulhak.org> X-Mailer: exmh version 2.0.1 12/23/97 To: Capriotti cc: freebsd-questions@FreeBSD.ORG Subject: Re: ppp aind dynamic IP In-reply-to: Your message of "Fri, 22 May 1998 09:13:00 -0300." <3.0.32.19980522090911.0092a7b0@pop.mpc.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 23 May 1998 02:55:37 +0100 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The -current version of libalias has firewall punching code that'll allow people inside access to the real world. To execute an external command (passing it your IP), put this in /etc/ppp/ppp.linkup: shell mycommand MYADDR HISADDR INTERFACE It's all in the man page :-) > I have 3 main questions about PPP: > > 1) after connection has been stablished, how do I know ehat IP address was > issued to me ? I would like to pass this ip value to an environment > variable to be used by ipfw latter, what takes me to the second question: > > 2) How do I execute an external command after ppp has connected to my ISP > (from ppp.conf preferably, since it is used everytime I have to connect)? I > need to pass the IP address to the environment, AND to run IPFW commands > like ipfw delete 100 deny tcp from any to ${old_ip_number] via tun0; ipfw > add 100 deny tcp from any to $[new_ip_got_from_ips] via tun0. > > It seems to be an easy way to keep my firewall working even with a DIAL-UP > loink to the internet. > > > Note: ppp -alias -auto being used, started from rc.d. > > TIA. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- Brian , , Don't _EVER_ lose your sense of humour.... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message