|
Re: lug-bg: iptables and ADSL
- Subject: Re: lug-bg: iptables and ADSL
- From: Peter Georgiev <peterg@xxxxxxxxxxx>
- Date: Thu, 4 Dec 2003 13:39:57 +0200
On Thu, 4 Dec 2003 10:18:54 -0000
"Vasko Tomanov" <vtomanov@xxxxxxxxxx> wrote:
> Imama server s ADSL vrazaka.. obasthe adresa koito polutshavam ot
> ADSL-a se meni vseki pat kato se restartne vrazkata po niakakva
> pritshina..
>
> iskam w definiciata na pravilata na IPTABLES da zadan ne tvardo IP s
> maska a IP-to na ppp0 naprimer ?
>
> kak moga da go nparavia tova za da ne mi se nalaga sled vseki restart
> da opraviam ip tables
>
Дефинирай IP-то като променлива във firewall скрипта и задавай стойност
на променливата примерно така:
IFCONFIG="/usr/sbin/ifconfig"
EXTIF="ppp0"
GREP="/bin/grep"
AWK="/bin/awk"
SED="/bin/sed"
IP="`$IFCONFIG $EXTIF | $GREP 'inet addr' | $AWK '{print $2}' |
$SED -e 's/.*://'`"
HTH Pesho
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|
|
|