From owner-freebsd-questions@FreeBSD.ORG Wed Aug 10 17:54:34 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80B0716A41F for ; Wed, 10 Aug 2005 17:54:34 +0000 (GMT) (envelope-from carstea.catalin@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FF8743D48 for ; Wed, 10 Aug 2005 17:54:33 +0000 (GMT) (envelope-from carstea.catalin@gmail.com) Received: by wproxy.gmail.com with SMTP id i5so187536wra for ; Wed, 10 Aug 2005 10:54:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=sFPb3OuC9bVewUnbjaLxGvyDs6cU0dhkUrnohdqSUIbeQIbXf9C/lYprBYbwMOOtsqSNoatA2dnL+DD6b5k6it5bRJARsCrIgoj8deL2YLle8+zKmXeZaGuAsEa4eFliTQtzmm7bNXh9FGnO3mOA77BzCg6FvNlutBBpwkWBhOg= Received: by 10.54.132.14 with SMTP id f14mr630107wrd; Wed, 10 Aug 2005 10:54:33 -0700 (PDT) Received: by 10.54.131.20 with HTTP; Wed, 10 Aug 2005 10:54:33 -0700 (PDT) Message-ID: Date: Wed, 10 Aug 2005 10:54:33 -0700 From: Carstea Catalin To: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Script - Tentation! ( for experts ) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 17:54:34 -0000 I want to make a script but i don't know how. Please help me!=20 1.I want one script that put MAC address automaticaly to my ruleset of ipf= w=20 and restart at the end of script ipfw - service . 2.In this script ipfw has rules to permit only some MAC addresses and deny= =20 others. *Ex: /etc/firewall.sh -add "00:23:f3:23:a0:e4" -name "WS1"* In this script ( /etc/firewall.sh ) are my rules to permit only MAC addres= s=20 of my LAN users specified with this inputs (*-add 00:23:f3:23:a0:e4 -name= =20 WS1)* ...........................................................................= ............... To make this script a must verify if exist "-add" and if exist i must verif= y=20 if exist " 02:23...." (the MAC) and after if exist "-name" and "ws#" ...........................................................................= ...........................................................................= .......................................... .....after i must add this MAC adress to ipfw command in the=20 /etc/firewall.sh ...........................................................................= ...........................................................................= ............................................ If exist one expert that can helpe me please give me the script! Tks! =20 Carstea Catalin