public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Help with script for iptables
@ 2006-11-15 20:29 Mick
  2006-11-15 21:25 ` Flophouse Joe
  2006-11-16  0:26 ` Iain Buchanan
  0 siblings, 2 replies; 8+ messages in thread
From: Mick @ 2006-11-15 20:29 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1158 bytes --]

Hi All,

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

UPLINK="eth0"

if [ "$1" = "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...]
==============================================

I would like to define more than one iface in UPLINK, e.g. eth0, wlan0, ppp0.  
How am I supposed to do this?  I've tried space, comma and colon as 
delimiters, but all fail.  I've also tried entering UPLINK="iface_name" one 
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 
fight my way out of a paper bag when it comes to scripting . . .  :)
-- 
Regards,
Mick

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-11-16 19:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-15 20:29 [gentoo-user] Help with script for iptables Mick
2006-11-15 21:25 ` Flophouse Joe
2006-11-15 23:15   ` Mick
2006-11-16  1:15     ` Flophouse Joe
2006-11-16  9:20       ` Mick
2006-11-16 15:19         ` Nangus Garba
2006-11-16 18:05           ` Mick
2006-11-16  0:26 ` Iain Buchanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox