Skip to main content

Server on a dynamic address, spring’s here

Spring must be here, since I can dry clothes on the Hills Hoist in the back yard now — up to 3 rounds a day, exciting high-tech stuff. I think the sun gets up to about 700w/m2 in between clouds now.

Meanwhile, I have a server to set up which has to live on a dynamic ADSL address since the ISP won’t offer static addresses & changing ISPs right now is a bit of a trauma for several reasons. Later, we might get a second ADSL connection with a different ISP, then give the first line the flick when the second is going steadily.

This situation won’t last forever, but until then I’ll have to have a cron job polling the router to look for a changed address, then go & notify the name servers when that changes.

By using short (5 minute?) timeouts in the DNS records, I should be able to respond reasonably quickly even if a visitor is mid-session when a change happens, & the initial users will be aware that it’s a trial situation so won’t be too fussy.

The script shouldn’t be too difficult, since all it will have to do is a lynx -source & gawk through the results for the IP address, then ssh to a user script which reprocesses the zone file & does an rndc reload on the results.

Will need a fallback process of some sort to detect the address even if the router stops responding as expected. I could do that at the DNS end with a very simple PHP script but would rather something a little more autonomous. Hmmm. It’s more expensive than I prefer, but printf %s $(echo $SSH_CLIENT) should do it.

Comments

Anonymous said…
Or, you could do what I do with some client sites, where I have a dyndns account running which the box checks and updates every minute.

I then have a cname entry in my DNS for the relevant subdomain at my end with a low TTL and, with a bit of fardnarkling, it's all (as they say in Tasmania) apples.

Steve Walsh

Popular posts from this blog

every-application-is-part-of-a-toolkit at work

I have a LibreOffice Impress slideshow that I wish to turn into a narrated video. 1. export the slideshow as PNG images (if that is partially broken — as at now — at higher resolutions, Export Directly as PDF then use ‘pdftoppm’ (from the poppler-utils package) to do the same). 2. write a small C program (63 lines including comments) to display those images one at a time, writing a config file entry for Imagination (default transition: ‘cross fade’) based on when the image-viewer application (‘display,’ from the GraphicsMagick suite) is closed on each one; run that, read each image aloud, then close each image in turn. 3. run ‘Imagination’ over the config file to produce a silent MP4 video with the correct timings. 4. run ‘Audacity’ to record speech while using ‘SMPlayer’ to display the silent video, then export that recording as a WAV file. 4a. optionally, use ‘TiMIDIty’ to convert a non-copyright-encumbered MIDI tune to WAV, then import that and blend it with the speech (as a quiet b

new life for an old (FTX) PSU, improved life for one human

the LEDs on this 5m strip happen to emit light centred on a red that does unexpectedly helpful things to (and surprisingly deeply within) a human routinely exposed to it. it has been soldered to a Molex connector, plugged into a TFX power supply from a (retired: the MoBo is cactus) Small Form Factor PC, the assorted PSU connectors (and loose end from the strip) have been taped over. the LED strip cost $10.24 including postage, the rest cost $0, the PSU is running at 12½% of capacity, consumes less power than a laptop plug-pack despite running a fan. trial runs begin today.

boundaries

pushing the actual boundaries of the physical (not extremes, the boundaries themselves) can often remove barriers not otherwise perceived. one can then often resolve an issue itself, rather than merely stonewalling at the physical consequences of the issue.