[olug] dynamic DNS at home
Daniel Pfile
daniel at pfile.net
Wed Feb 18 00:41:33 UTC 2004
My dlink lets me assign ips based on mac addresses using dhcp. Once you
have every machine using the same ip every time just make yourself a
master host file and download it to the other pcs with a batch file on
bootup/crontab/manually when you need it updated. KISS.
Something like this for windows:
dim oServer
dim oFso
dim hosts
set oServer = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
set oFso = createobject("Scripting.FileSystemObject")
oServer.open ("GET", "http://ip.of.main.pc/path/to/latest/hosts/file",
false)
oServer.send
hosts = oFso.CreateTextFile("c:\\winnt\\system32\\drivers\\etc\\hosts",
true)
hosts.write(oServer.responseText)
hosts.close()
Adjust as needed, I didn't test it, and you may need to install msxml,
or rewrite it. YMMV
or this for linux:
#!/bin/sh
wget http://ip.of.main.pc/path/to/latest/hosts/file > /etc/hosts
Boy, which one of those is easier to automate?
-- Daniel
On Feb 17, 2004, at 3:31 PM, <thelarsons3 at cox.net> wrote:
> Hi guys. Here's my situation...
>
> I have a small home LAN. Basically it's a Linksys router handling
> DHCP, my wife's WinPC, my Linux box, and a number of other "tinker"
> boxes that are not always online. These other machines usually reside
> in a closet or the basement and only come out when I am putzing with
> one. From time to time I fix one up nice, give it away, and get some
> other semi-obsolete box to play with. So it's a revolving collection.
>
> Is there some way I can automagically detect all the computers' names
> from other computers on the network so I don't have to refer to them
> by IP when they're online? The Linksys doesn't do DNS, only DHCP.
> None of my machines (even the main two) are consistently up 24/7, as
> we'll turn them off if we think we're going to be away for an extended
> period, so I don't think a DNS server will work. Manually updating
> /etc/hosts with static addresses on all those machines would be a
> PITB.
>
> If there were a way to poll the LAN and query names from active IPs,
> that would be great. Does such a thing exist, is there another
> technique I haven't thought of, or am I stuck? If the solution
> requires that I leave one machine up all the time I'll consider it,
> but a script I could run from anywhere as needed would be ideal. If
> there are instructions somewhere just point me, but I don't know where
> to start looking.
>
> Thanks,
> Tim
>
> --
> Tim & Alethea
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
More information about the OLUG
mailing list