Salut,

On Sat, Jul 28, 2001 at 08:16:05AM -0700, Randolph S. Kahle wrote:
> 
> 
> I think I am two questions away from getting this to work:
> 
>     * What script is run when the connection to the ISP completes?
>     
>     * How do I know, in that script, what my assigned IP is?
Actually you could do something like
$IP=`ifconfig ppp0 | sed -e 's/^.*inet addr:\([0-9.]*\).*/\1/' | awk -F:\
'{print $2}'`
(I think, this works if you want the ip of ppp0)
but you will not need it for firewalling, because ipchains can 
handle devices, e.g.
`ipchains -A input -i ppp0 -p tcp --syn -s 0/0 -d 0/0 -j DENY`
will deny all incoming syn tcp packets.

> 
> I see that there are directories /etc/ppp/ip-up.d and
> /etc/ppp/ip-down.d. What is the function of those directories? Are the
> scripts in those directories all run on "up" and "down" state
> transitions for ppp?
Exactly. Take a look at `man pppd` and search for 'ip-{up,down}'.
> 
> -- Randy
        jops,
                Christoph.
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

-- 
Anything that is good and useful is made of chocolate.

Reply via email to