[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ipmasqadm and firewall stuff



----- Original Message -----
From: Jamin W.Collins <jcollins@asgardsrealm.net>
To: <debian-user@lists.debian.org>
Sent: Wednesday, September 11, 2002 3:56 PM
Subject: Re: ipmasqadm and firewall stuff


> On Wed, 11 Sep 2002 15:46:34 -0400
> "jeff" <jmr71769@earthlink.net> wrote:
>
> > ipmasqadm portfw -a -P tcp -L 4.x.x.x 4000 -R 192.168.1.11 4000
> >
> > now then... i had to manually put in my $EXTERNAL_INTERFACE (the
> > 4.x.x.x) because for some reason, ipmasqadm won't accept the variable.
>
> Hmmm, ipmasqadm has nothing to do with the variable.  The variable should
> be expanded by your shell prior ot the command execution.  What happens
> when you try to use the variable in place of the actual IP.  Have you
> verified that the variable contains that correct information, and nothing
> more, just before the execution of this command.  If you are using bash,
> have you tried adding a '-x' after the #!/bin/bash at the top of the
> script?
>
> --
> Jamin W. Collins
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org
>

hi jamin...

all i had to do was do a double-take on my script and i figured it out.

right at the beginning, i totally missed this:

IPADDR=`/sbin/ifconfig ppp0 |  grep "inet addr" | awk -F":" '{print$2}' |
awk '{print $1)' `

there's my missing variable... i only get a small self-inflicted DUH this
time because i actually figured it out...  LOL...

it works fine with the above ipmasqadm statement:

ipmasqadm portfw -a -P tcp -L $IPADDR 4000 -R 192.168.1.11 4000

anyway, i'm still fairly new to linux... and damn there's so much to
learn...  but i love it...

thanks for the quick reply anyway....

-jeff



Reply to: