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

Re: [SOLUTION!] How do I find my local IP assigned by my ISP when using pon, etc?



First,

Thank you to everyone that sent email about my question. 

The solution turned out to be very simple.

When pon causes a connection to be made to an ISP, the script

/etc/ppp/ip-up

is run. In Debian (2.2r3) this script accepts several parameters from
pppd. They are set and exported as:

PPP_IFACE
PPP_TTY
PPP_SPEED
PPP_LOCAL
PPP_REMOTE
PPP_IPPARM

ip-up then runs all scripts it finds in

/etc/ppp/ip-up.d

In that directory I created a link

ln -s /etc/ipchains/rules-T22 firewall-up

and in my firewall rules set I set

IPADR_INTERNET="$PPP_LOCAL"

and I am done.


(I have a regular set of ipchain rule files, so this is the only link I
need to my previous work).

I made the corresponding links, etc for ip-down.d

Very slick!

Thanks again.

Regards,

Randy



On 28 Jul 2001 08:16:05 -0700, Randolph S. Kahle wrote:
> 
> I am running potato and trying to configure dial-up Internet access.
> 
> Everything is running fine - I can dial the ISP, authenticate, get an IP
> address, etc.
> 
> Now I am trying to write firewall rules that will adapt to whatever IP I
> am assigned.
> 
> 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?
> 
> 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?
> 
> -- Randy
> 
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
> 




Reply to: