Subdomain hassles

Michael Morris

First Post
I'm trying to get some subdomains working on a linux server at work. Once I figure this out there I'll probably use this same technique here someday.

Some help from our other technically savvy users would be appreciated - I'm going to continue to hunt on google of course while I wait.

Anyway, my company machine is hosting a set of pages for the local city government and it's departments. I am to set them up as follows

www.williamsburgky.com <-- Main page, tourism pages
police.williamsburgky.com <-- Police page
firedept.williamsburgky.com <-- Fire Dept page
cityhall.williamsburgky.com <-- City Hall.

Eventually there will be others.

I created a zone file named williamsburgky.zone with these contents.

Code:
$TTL 86400
$ORIGIN williamsburgky.com.
@ 1D IN SOA @ root.williamsburgky.com (
        100     ; serial
        3H      ; refresh
        15M     ; retry
        1W      ; expiry
        1D )    ; minimum

1D IN NS @
1D IN A 70.147.81.213

police IN A 70.147.81.213
cityhall IN A 70.147.81.213
firedept IN A 70.147.81.213

I created a reverse lookup file called master.zone and here are it's contents.

Code:
$TTL 86400
; Remember zone name is 81.147.70.in-addr.arpa
@       IN SOA williamsburgky.com. root.williamsburgky.com (
                1       ; Serial
                28800   ; Refresh
                14400   ; Retry
                3600000 ; Expire
                86400 ) ; Minimum

        IN NS williamsburgky.com.
1       IN PTR williamsburgky.com.
1       IN PTR police.williamsburgky.com
1       IN PTR firedept.williamsburgky.com
1       IN PTT cityhall.williamsburgky.com

I started up named, and it's running so apparently there are no syntax errors. However, a dig command to the police.williamsburgky.com returns

Code:
; <<>> DiG 9.3.0 <<>> police.williamsburgky.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 46625
;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;police.williamsburgky.com.     IN      A

;; Query time: 340 msec
;; SERVER: 70.147.81.209#53(70.147.81.209)
;; WHEN: Tue Jun 14 14:59:37 2005
;; MSG SIZE  rcvd: 43

And an internal ping on the same machine for the address returns

Code:
root@tekswork:/var/named# ping police.williamsburgky.com
PING police.williamsburgky.com.tekswork.com (70.147.81.210) 56(84) bytes of data.
64 bytes from adsl-070-147-081-210.sip.bgk.bellsouth.net (70.147.81.210): icmp_seq=1 ttl=255 time=2.08 ms
64 bytes from adsl-070-147-081-210.sip.bgk.bellsouth.net (70.147.81.210): icmp_seq=2 ttl=255 time=1.92 ms

tekswork.com is our company's own domain, hosted on the same site. Machine 210 is our Windows 2003 machine, which was our prior webhost before I set up this linux machine (and I still need to set it up to receive queries to exchange.tekswork.com for our email services).

Anyway, any ideas?
 

log in or register to remove this ad

Michael Morris said:
Code:
$ORIGIN williamsburgky.com.
@ 1D IN SOA @ root.williamsburgky.com (
        100     ; serial
        3H      ; refresh
        15M     ; retry
        1W      ; expiry
        1D )    ; minimum

1D IN NS @
1D IN A 70.147.81.213

police IN A 70.147.81.213
cityhall IN A 70.147.81.213
firedept IN A 70.147.81.213

I created a reverse lookup file called master.zone and here are it's contents.

Code:
$TTL 86400
; Remember zone name is 81.147.70.in-addr.arpa
@       IN SOA williamsburgky.com. root.williamsburgky.com (
                1       ; Serial
                28800   ; Refresh
                14400   ; Retry
                3600000 ; Expire
                86400 ) ; Minimum

        IN NS williamsburgky.com.
1       IN PTR williamsburgky.com.
1       IN PTR police.williamsburgky.com
1       IN PTR firedept.williamsburgky.com
1       IN PTT cityhall.williamsburgky.com

About the only thing that I can see wrong with these is that I believe there should be a . (dot) at the end of root.williamsburgky.com (ie root.williamsburgky.com.) in both the zone and reverse dns file, plus on the last three entries in the reverse dns file (police, firedept, cityhall). I think things get a bit funny if you don't add them (though I can't remember why exactly).

My experience is only with Bind, however, so it may have no bearing in your case.

[Edit: oh, and shouldn't PTT in the reverse dns file be PTR?]
 

Remove ads

Top