From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
	by nuthatch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-54820-garchives=archives.gentoo.org@gentoo.org>)
	id 1GkRSO-0004sd-Vd
	for garchives@archives.gentoo.org; Wed, 15 Nov 2006 20:34:05 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
	by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kAFKVrgY026522;
	Wed, 15 Nov 2006 20:31:53 GMT
Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189])
	by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kAFKTiqN028451
	for <gentoo-user@lists.gentoo.org>; Wed, 15 Nov 2006 20:29:45 GMT
Received: by nf-out-0910.google.com with SMTP id c31so1305168nfb
        for <gentoo-user@lists.gentoo.org>; Wed, 15 Nov 2006 12:29:45 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:from:reply-to:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:message-id;
        b=M7bL8JG2OK2Ly5gBS0y2mUWB3rLPtcqTKKfTvuTQh54ljUg6xgO+lZda0+62e25HhmoTg9tihwNpw+M/OEbEY7QUnhAFvEUR0CH/UY2UX97bTJpgcbmHYYZ6a1gwZx6X8FFfygHHzPEXffGQUoLc7ZFAqO2YVdaL0bt/HDxvEL0=
Received: by 10.49.80.12 with SMTP id h12mr1509351nfl.1163622584842;
        Wed, 15 Nov 2006 12:29:44 -0800 (PST)
Received: from ?192.168.0.5? ( [213.162.120.196])
        by mx.google.com with ESMTP id k24sm6239785nfc.2006.11.15.12.29.42;
        Wed, 15 Nov 2006 12:29:43 -0800 (PST)
From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Help with script for iptables
Date: Wed, 15 Nov 2006 20:29:33 +0000
User-Agent: KMail/1.9.5
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart1445258.VYmcuUJsOB";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200611152029.35737.michaelkintzios@gmail.com>
X-Archives-Salt: e3e6c116-b280-4dfb-a2c3-0d7bbc02fa86
X-Archives-Hash: 3c0610b1a352ecdd726f5198cc8e5469

--nextPart1445258.VYmcuUJsOB
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi All,

I have been using Daniel Robbins' basic script for years but now on a lapto=
p I=20
have more than one ways of connecting to the Internet.  The script uses the=
=20
variable UPLINK to define the incoming interface like so:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#change this to the name of the interface that provides your "uplink"
#(connection to the Internet)

UPLINK=3D"eth0"

if [ "$1" =3D "start" ]
then
        echo "Starting firewall..."
        iptables -P INPUT DROP
        iptables -A INPUT -i ! ${UPLINK} -j ACCEPT
        iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
[snip...]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

I would like to define more than one iface in UPLINK, e.g. eth0, wlan0, ppp=
0. =20
How am I supposed to do this?  I've tried space, comma and colon as=20
delimiters, but all fail.  I've also tried entering UPLINK=3D"iface_name" o=
ne=20
on each line, but the last line seems to be the one that is always used.

I'd very much appreciate your script savvy guidance here, because I couldn'=
t=20
fight my way out of a paper bag when it comes to scripting . . .  :)
=2D-=20
Regards,
Mick

--nextPart1445258.VYmcuUJsOB
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBFW3iv5Fp0QerLYPcRAq3kAKC1uoMkdGQeYJGU623J+YJ7wDYlCQCg0T/h
yPUVWf9ZybIw0qZvzBmznL4=
=0084
-----END PGP SIGNATURE-----

--nextPart1445258.VYmcuUJsOB--
-- 
gentoo-user@gentoo.org mailing list