On Mon, Nov 05, 2007 at 09:55:15PM +0000, mbm wrote:
Chris
I have a CNAME record in the zone file at the hosting provider that hosts isbd.net so that home.isbd.net has the address 84-45-228-40.no-dns-yet.enta.net which is my home machine (via ADSL).
I'm assuming that enta.net give you a fixed IP address here. It certainly looks that way from their website. So the external world view of your "home.isbd.net" server will be OK and will resolve to the external address of your ADSL router. I also assume that you are either port forwarding 22 and 80 to your "home" machine or have it publicly available on a DMZ.
Your assumptions are all pretty correct. I have a static address, my router is set up to forward ports 80 and 22 as you say (I'm considering limiting it a bit more by only allowing connections from certain IP addresses).
So far so good, it all does basically what I want so that I can 'ssh home.isbd.net' and log in to my home machine and http://home.isbd.net in a browser gets to see the apache web pages on my home machine.
However I still don't seem to have the 'local' setup fully sorted, i.e. how do I get things on my local intranet to work totally correctly? As it is things work but there are some 'infelicities'.
In particular apache when it starts up has the message about "Could not reliably determine the server's fully qualified domain name ...." and I'd like to know the proper way to get the result of 'hostname' to be right.
Ther apache error is probably not a DNS issue, but more likely caused by a configuration problem in apache2.conf (or httpd.conf). Try setting the ServerName directive to the FQDN "home.isbd.net". Apache will then use that and should stop complaining.
OK, thanks.
My home network is behind a router and most machines have static IP addresses in the 192.168.1 range, the router is set up to allow ssh and http through (with limitations).
In my /etc/hosts file I have:-
127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 192.168.1.1 home home.isbd.net 192.168.1.5 garage 192.168.1.10 chris 192.168.1.40 netpr 192.168.1.44 hp7310 HPEDDBB7 HP000D9D068F7D 192.168.1.254 speedtouch
Searching in google suggests that I need to add my proper hostname (i.e. home.isbd.net) to the 127.0.0.1 line in /etc/hosts but that sounds like it's incompatible with the 192.168.1.1 line.
I recommend you don't alias your hostname to local loopback. Leave that to localhost. The 192.168.1.1 entry is fine. So long as all your hostfiles are in synch and your machines all look at local hosts files first (/etc/host.conf says "order hosts,bind") then they will all resolve "home.isbd.net" to 192.168.1.1.
Alternatively you could run a local DNS server (possibly on your router) but for a small network that is probably more hassle than it is worth.
I want to end up in a situation where:-
/bin/hostname returns 'home' (as opposed to home.isbd.net, so that my prompts and window titles are sensible) home.isbd.net is a valid address on my local network and connects to the linux server machine There are no complaints from apache (or others) at startup
Just set each hostname locally to "foo" and ensure that /etc/hosts has alias entries for "foo.bar.net" as appropriate. Your example hosts file is fine, but you should have aliases for "garage.isbd.net", "chris.isbd.net" etc. to ensure proper resolution.
So it looks like I can't get 'hostname' to return 'home' as I want, never mind, it's not a big issue.