Re: Firewall with dynamic IP
You might want to try something like this for /etc/dhclient-exit-hooks
if you're using the ISC dhcp client.
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
mail -s "new dhcp address = $new_ip_address" user@somewhere </dev/null
The above code hasn't been tested. You should be able to use a mail
client without a mail server running.
If you don't even have mail clients, you could telnet to port 25 and use
<<! to inline the commands to send mail manually, use some perl code
to mail (I think there are some modules for SMTP support), ftp a file
(again, you might need to use <<! to generate ftp commands) containing
your new address to your web page (that's what I do.)
On Fri, Aug 11, 2000 at 05:30:52PM +0200, Julien Stern wrote:
> Hi all,
> I have a stupid problem with my firewall.
> It's very simple (no DMZ) and it has a dynamic IP.
> Everything works fine. However, I would like to be
> able to know what's the new IP of my firewall when I'm
> Nothing runs of the firewall except ssh2 and syslogd
> (oh, well there is cron, portmap, tcplogd and a few others, but
> no ftp, telnet, web, rlogin, mail... no services basically).
> So, how to get the firewall new IP when it changes?
> If I can retrieve the IP from an inside box, I can simply
> mail it to an outside account. But how to retrieve this
> address automatically, simply and securely?
> To UNSUBSCRIBE, email to email@example.com
> with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org
Lee Bradshaw lee@sectionIV.com (preferred)
Alantro Communications email@example.com