http://qs321.pair.com?node_id=186373


in reply to Getting an IP address from DHCP

Hmm, you are not so precise in describing neither your setup or your problem. You don't give us enough data for us to help you with a precise answer, so I'll give you a broad one.

As far as I understand your setup, the broadband router and the firewall is the same box, and this box is also the one that is changing it's outer IPaddress through DHCP all the time. Your problem is that you do not know how to see the IPadress on the router/firewall's outer interface from the Linux box. Am I correct so far? Also, the router/fw is essentially a black box that you can't install software on, at least not Linux software, correct?

So, you need to access to router/firewall in some way to get that IPadress. I would guess you can either telnet into it or surf to it, or perhaps even use SNMP. SNMP is, at least for me, hard to work with, you probably need the MIB and stuff, so let's not bother. If you can surf to it, use LWP to fetch the data you need. If you can telnet to it, use Expect and catch the data.

When you have the data you need, use any technique for distributing that data to you, either through a mail, or a call using LWP to dyndns et al. See also freshmeat, I think there are some dyndns update utilities already written.