I have a few Mac minis now, running various server software. Two on Ubuntu and one still on Mac OS X – but not for much longer since I have found Linux superior when it comes to support for home automation stuff and weather stations. A challenge is to always find the servers when IP changes.
My Web hotel provider Space2u offers a dynamic DNS service and I have registered a few aliases to my servers there. On the Ubuntu servers I have installed EZ-ipupdate to /usr/local/bin, configured with my settings. That takes care of updating the dynamic DNS service. To make sure it’s always running I added it to startup by creating a file “local” like this
sudo nano /etc/init.d/local
and put
#!/bin/sh
/usr/local/bin/dyndns.conf
it it. Then made sure this file is executable and added to the init chain:
sudo chmod +x /etc/init.d/local
sudo update-rc.d local defaults 80
That’s all for dynamic IP handling. Now, to always find the right server when routing through my Airport Base Station I set up port mappings to a fixed local IP, like 10.0.1.222 and added an alias on the server by editing /etc/dhcp3/dhclient.conf and add
alias {
interface "eth0";
fixed-address 10.0.1.222;
}
to it. Finish up by hitting
/etc/init.d/networking restart
and Voilá! The Ubuntu server is now listening on a fixed local IP as well but still getting all router and DNS info through DHCP. Next step: install ez-ipconfig on the Mac server, but first some digging in the garden.







No comments yet.
Leave a comment