simple question about a "rule"

dave d.eason at home.com
Tue Jun 26 13:20:36 PDT 2001


Thanks.  Someone also recommended that I add a line to disable ssh from
the rest of OUTERNET, me just starting to learn this stuff, I've no
clue... Any one?



-Dave

-----Original Message-----
From: Nelson Garcia [mailto:garcian002 at hawaii.rr.com] 
Sent: Tuesday, June 26, 2001 4:15 PM
To: Linux & Unix Advocates & Users
Subject: [luau] Re: simple question about a "rule"

You can also use variables like this:
TRUSTEDHOST1="65.8.38.182"
TRUSTEDHOST2="65.8.38.183"

ipchains -A input -p tcp -s $TRUSTEDHOST1 -d $OUTERNET 22 -j ACCEPT
ipchains -A input -p tcp -s $TRUSTEDHOST2 -d $OUTERNET 22 -j ACCEPT

It makes it easier to make changes and to reuse the values for other
rules.

More from the variables department.
I have this at the top of my script:
#capture the external ip address
extip="`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | sed
-e
's/.*://'`"
# EXTERNAL interface name
extint="eth0"
echo starting firewall on interface $extint, ip address: $extip

Then I use $extint and $extip throughout my script

I hope that helps.

----- Original Message -----
From: "dave" <d.eason at home.com>
To: "Linux & Unix Advocates & Users" <luau at maile.hi.net>
Sent: Tuesday, June 26, 2001 09:41 AM
Subject: [luau] simple question about a "rule"


> The pmfirewall script asked me if I wanted to allow access to SSH by
ip
> I said yes, it created this rule for me
>
> #SSH
> $IPCHAINS -A input -p tcp -s 65.8.38.182 -d $OUTERNET 22 -j ACCEPT
>
>
> can I mimick that rule, and change the ip and paste it right below?
> There are only about 5 ip addresses, all static that need ssh access
to
> my box.
>
>
>
> -Dave
>
>
> ---
> You are currently subscribed to luau as: garcian002 at hawaii.rr.com
> To unsubscribe send a blank email to $subst('Email.Unsub')
>


---
You are currently subscribed to luau as: d.eason at home.com
To unsubscribe send a blank email to $subst('Email.Unsub')



More information about the LUAU mailing list