PTR Records in ISPConfig 3

Discussion in 'General' started by guimnk, Aug 17, 2009.

  1. guimnk

    guimnk Member

    Hi all..

    I've authority over of my ip block (example: 192.168.1.0/28)

    I'm trying to create my own PTR records in ISPConfig.

    This is a example of PTR Zone using bind9:

    Code:
    zone "1-30.1.168.192.in-addr.arpa" {
            type master;
            file "/etc/bind/db.192";
    };
    
    Code:
    $TTL    604800
    @       IN      SOA     test.domain.com. root.test.domain.com. (
                         2009040101         ; Serial
                               3600         ; Refresh
                              86400         ; Retry
                            2419200         ; Expire
                             604800 )       ; Negative Cache TTL
    ; NS
    @	IN      NS      ns1.domain.com.
    @	IN      NS      ns2.domain.com.
    
    ; domain.com
    10        IN      PTR     test.domain.com.
    
    And it is a Zone of domain.com:

    Code:
    $TTL    604800
    @       IN      SOA     test.domain.com. root.test.domain.com. (
                         2009040101         ; Serial
                               3600         ; Refresh
                              86400         ; Retry
                            2419200         ; Expire
                             604800 )       ; Negative Cache TTL
    ; NS
    @	IN      NS      ns1.domain.com.
    @	IN      NS      ns2.domain.com.
    
    ; domain.com
    ns1		IN	A	192.168.1.1
    ns1	        IN	A	192.168.1.2
    
    test           IN    A        192.168.1.10
    
    So, the IP test.domain.com is 192.168.1.10 and 192.168.1.10 resolve test.domain.com

    In ISPConfig I'm trying to create a new zone with name 1-30.1.168.192.in-addr.arpa. and next, will create a NS record and PTR record. Example:

    Code:
    Zone: 1-30.1.168.192.in-addr.arpa.
    Nameserver Hostname: ns1.domain.com.
    
    Zone: 1-30.1.168.192.in-addr.arpa.
    Nameserver Hostname: ns2.domain.com.
    
    Name: 1
    Canonical Name: ns1.domain.com.
    
    Name: 2
    Canonical Name: ns2.domain.com.
    
    Name: 10
    Canonical Name: test.domain.com.
    
    And in zone of "domain.com" is:

    Code:
     
    Hostname: ns1.domain.com.
    IP-Address: 192.168.1.1
    
    Hostname: ns2.domain.com.
    IP-Address: 192.168.1.2
    
    Hostname: test.domain.com.
    IP-Address: 192.168.1.10
    
    I'm trying to view the result but not works.. Please, how can I do to fix it?
     
    Last edited: Aug 18, 2009
  2. till

    till Super Moderator

    You missed to add the dot at the end of ns1.domain.com, ns2.domain.com
    and test.domain.com. It must be:

    ns1.domain.com.
    ns2.domain.com.
    test.domain.com.
     
  3. guimnk

    guimnk Member

    till,

    It's added.. And when I try to resolve my IP, I get

    Code:
    Host 1.1.168.192.in-addr.arpa. not found: 3(NXDOMAIN)
    
     
  4. guimnk

    guimnk Member

    This is the configuration screen

    [​IMG]

    [​IMG]
     
  5. bluejay3

    bluejay3 New Member

    Another zone may be required

    I believe you need another reverse DNS zone for the whole subnet, 1.168.192.in-addr.arpa.
    In this zone, add NS records:
    NS 1-30 ns1.yourserver.com.
    NS 1-30 ns2.yourserver.com.
    and a CNAM for each record you have control over, pointing to your 1-30.1.168.192 zone:
    CNAME 1 1.1-30 (no trailingperiods, the full zone name is appended)
    CNAME 2 2.1-30
    ....
    CNAME 30 30.1-30

    Therefore, given a lookup for 192.168.1.5, it will look for 5.1.168.192... which returns 5.1-30 (no period, so really equal to 5.1-30.1.168.192.in-addr.arpa) which will then look in your 1-30.1.168.192... zone and find the PTR record for 5.

    Note the 1-30 zone prefix is arbitrary and can be anything really, but it helps with identication.
     
  6. guimnk

    guimnk Member

    CNAME Record??

    I create a new zone with name: 1.168.192.in-addr.arpa.

    And I create a records:

    NS 1-30 ns1.domain.com.
    NS 1-30 ns2.domain.com.
    CNAME 1 1-30

    But it not works..
     
  7. bluejay3

    bluejay3 New Member

    The CNAME records should be like:
    type: CNAME
    name: 1
    data: 1.1-30
    .....
    type: CNAME
    name: 29
    data: 29.1-30


    Here is a full briefing I have for users of ISPConfig:
    1. Create a new zone for the block of IPs and assign the new zone to the client
    Example: Customer has 192.168.10.8/29, create zone 8-29.10.168.192.in-addr.arpa
    (Note: the "8-29" zone prefix is arbitrary but helps us with identification of subnet)
    2. Move the records (Example: hosts 8 through 15) manually or via database to new zone
    3. In old zone (10.168.192.in-addr.arpa), add NS records for the new zone prefix
    Example: NS 8-29 dns1.example.com.
    NS 8-29 dns2.example.com.
    4. In old zone, add CNAME records for each host in customer's range pointing to the new zone
    in the form of CNAME [host] [host].[new zone prefix]
    Example: CNAME 9 9.8-29
    CNAME 10 10.8-29
    5. Refresh the zones.
    Now a PTR lookup will for 192.168.10.11 will query 11.10.168.192.in-addr.arpa and get a CNAME
    of 11.8-29.10.168.192.in-addr.arpa which will return the proper value for host 11 in the newly
    created zone.

    (Note: This procedure can be applied to a single record and non-continous ranges)
     
    Last edited: Aug 21, 2009

Share This Page