Results 1 to 4 of 4

Thread: How to get resolve fake domains, aka split dns, with Ubuntu 8.04

  1. #1
    strafford is offline Loyal Member
    Join Date
    Apr 2008
    Location
    Brighton, ON, Canada
    Posts
    88
    Rep Power
    6

    Default How to get resolve fake domains, aka split dns, with Ubuntu 8.04

    Thanks to soxfan and uxbod I was finally able to get a split dns - to resolve a fake domain - running on my install of Ubuntu 8.04 Server Ed. (mine is 64 bit). There are how-tos and other posts on this but they did not contain all the info I needed to get this running.

    Be sure to do this BEFORE you install Zimbra. My machine name is mailserv and the sub-domain mailserv.mydomain.com does not actually exist. Local IP address is 192.168.7.101.


    1.Install Ubuntu Server Ed. (no GUI, no extras/add-ons). Basically, you can take all the defaults (just make sure your networking is setup correctly).

    2.Install openssh-server - optional but allows remote admin - and bind9 (using apt-get).

    3.Setup /etc/hosts file as follows (where mailserv is the name of the machine and 192.168.7.101 is the local/internal IP address of the machine):
    Code:
    127.0.0.1       localhost.localdomain localhost
    192.168.7.101   mailserv.mydomain.com mailserv
    4.Setup /etc/resolv.conf as follows (w/ local IP address):
    Code:
    search mydomain.com
    nameserver 192.168.7.101
    5.Setup /etc/bind/named.conf.options:
    Code:
    options {
            auth-nxdomain no;    # conform to RFC1035
    	query-source address * port 53;
          	directory "/var/named";
          	dump-file "/var/named/data/cache_dump.db";
    	        	statistics-file "/var/named/data/named_stats.txt";
            		forwarders { 24.226.1.93; 24.226.10.193; };
    };
    include "/etc/bind/rndc.key";
    zone "mydomain.com" {
            type master;
            file "/var/named/db.mydomain.com";
    };
    Note. You will probably have to add the /var/named and /var/named/data directories. Also, the forwarders are the IPs of your actual DNS servers, usually assigned by your ISP

    6.Setup a new file /var/named/db.mydomain.com:
    Code:
    		;
    		; BIND data file for mydomain.com
    		;
    		$TTL    604800
    		@       IN      SOA     mydomain.com. admin.mydomain.com. (
                        		     070728         ; Serial
                             		604800         ; Refresh
    		                          86400         ; Retry
                            		2419200         ; Expire
    		                         604800 )       ; Negative Cache TTL
    		;
    		@       IN      NS      192.168.7.101
    		        IN      A       192.168.7.101
    		        IN      MX      10 mailserv
    		mailserv        IN      A       192.168.7.101
    Note: You MUST update/increment the serial number in this file each time you change it. Otherwise the changes will not take. Also, on the IN SOA line, the second entry is your domain's administrator email address, but using a '.' in place of the '@' symbol.

    7.Fix apparmor (there is a bug) by changing the following line in /etc/apparmor.d/usr.bin/named:
    Code:
    /proc/net/if_inet6 r,
    to:
    Code:
    /proc/**/net/if_inet6 r,
    8.Also set apparmor to only complain about bind:
    Code:
    sudo aa-complain /usr/sbin/named
    9.Reboot. Check that all is working by issuing the command nslookup on your “domain” and you should get a response somewhat similar to:
    Code:
    user@mailserv:~$ nslookup mailserv.mydomain.com
    		Server:         192.168.7.101
    		Address:        192.168.7.101#53
    
    		Name:   mailserv.mydomain.com
    		Address: 192.168.7.101
    Last edited by strafford; 04-12-2010 at 06:43 AM. Reason: Clarification

  2. #2
    jigskep is offline New Member
    Join Date
    Sep 2010
    Posts
    4
    Rep Power
    4

    Default Does not work !!

    Hi,

    First of all, thank you for the detailed information. I tried your method but it does not seem to be working.. After following all the steps when I do nslookup, it sill shows some public ip rather than my local ip. Am I missing something ???

    I know its an old post but hope to see some reply

    Thanks.

  3. #3
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,201
    Rep Power
    56

    Default

    Quote Originally Posted by jigskep View Post
    First of all, thank you for the detailed information. I tried your method but it does not seem to be working.. After following all the steps when I do nslookup, it sill shows some public ip rather than my local ip. Am I missing something ???
    This subject has been covered many times in the forums, there's even a wiki article on Split DNS - read that article for details on what's needed (or search the forums) and confirm the settings by running all the commands in the 'Verify....' section of that article.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  4. #4
    strafford is offline Loyal Member
    Join Date
    Apr 2008
    Location
    Brighton, ON, Canada
    Posts
    88
    Rep Power
    6

    Default

    Quote Originally Posted by jigskep View Post
    Hi,

    First of all, thank you for the detailed information. I tried your method but it does not seem to be working.. After following all the steps when I do nslookup, it sill shows some public ip rather than my local ip. Am I missing something ???

    I know its an old post but hope to see some reply

    Thanks.
    All I can say at this point is double and triple-check your setup/settings files. That is where I found most of the problems were.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 08-28-2009, 09:35 AM
  2. Replies: 9
    Last Post: 05-22-2009, 08:03 AM
  3. Get emails out of zimbra or get it working again?
    By kingfeanor in forum Migration
    Replies: 9
    Last Post: 11-25-2008, 01:02 AM
  4. Replies: 15
    Last Post: 04-14-2008, 12:29 PM
  5. Split DNS setup help? Ubuntu and zimbra 4.5RC2.
    By nfear24 in forum Installation
    Replies: 2
    Last Post: 01-11-2007, 07:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •