Hi Andrew!

> I was wondering if someone could help me with a similar problem to the one
> below.   I am running an Eiger version with the extended scripts installed in a
> dial on demand configuration.   My problem stems from the fact that the modem is

I'll try but I'm not familiar (though I know what you mean) with that kind of 
configuration...

> dns2go is called from the /etc/ppp/ip-up script and deactivated from the
> /etc/ppp/ip-down script.   This works for me ok.   My problem is to activate the
> port forwarding also at this time and to that end I have created a script using
> the relevant parts of the network.conf and ipfilter.conf which I have called
> ports and placed in the /etc/ppp/ip-up.d directory as my research indicated
> scripts in this directory should be run after the ip-up script.   Can someone
> tell me if this is true and if not how and what I need to change to make this
> script run every time the modem dials?

I think it's true but can't confirm it... I do use PPPOE (ppp over ethernet)
and I know some people do something similar with it to track IP changes but
that's not how I implemented my "ip change tracking" (I submit a job which
takes care of that...)...

> My other problem is similar to below and concerns the part that finds the
> EXTERN_IP address.   if I type the same commannd at the prompt I get the
> following result.
> 
> gra005: -root-
> # ip addr list label ppp0 | grep inet | sed '1!d' | sed 's/^.*inet
> \(.*\..*\..*\..*\)\/.*$/\1/'
> 194.152.64.35 peer 194.192.64.35
> 
> Am I missing something or have I typed this line in incorrectly?   At this point

Nope, there does seem to be a problem with that command...

> I believe the result I am receiving is causing my problem.  

Yes, it is...

> Can anyone help?

I'll try...

> The contents of the script I created are as follows, straight from Charles's
> scripts.   I am not well versed in Linux/Unix/LRP scripting and my entire Linux

I'm not well versed in scripting either so there might be some problems with 
it but this is what I use (take straight from /etc/network.conf)

  EXTERN_IP=`ip addr list label $EXTERN_IF | \
             grep inet | \
             sed '1!d' | \
             sed 's/^[^0-9]*\([.0-9]*\).*$/\1/'`

I believe this either comes from a previous version of Charles' scripts or from one
of the LEAF/lrp images I used in the past...

> #! /bin/sh
> #
> # This script is run with a dial up modem connection using DHCP with a non fixed
> # address to enable port forwarding to internal services after the interface
> # is up so that the true address of the external interface is used in the
> # port forwarding commands.

...

I haven't checked that solution in detail but I believe you could avoid some "code 
duplication"
by trying to invoke 'svi ipfilter reload' (I think that would be the right command, 
correct my
if I'm wrong) from your scripts.

Good luck!

Nick

_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to