test bind before moving to production

2014-07-03 Thread brian
*I'm new to bind. I want to be able to test the dns server on my local 
machine before launching it by putting the domain names (ie example.com) 
in my browser and browsing the site.*



*Both the dev and production machines are CentOS. I assume I'll need to 
edit the host file to redirect to the local dns. But with this method 
I'm not sure how it will resolve multiple domains (i.e. example.com and 
example2.com).*



*I use a virtual box version of CentOS to run experiments so I can do a 
host/guest thing if needed. *



*There are 2 ways I'll use the dns in production. At the domain register 
I'll either point to this dns server or host the dns at the domain 
register and point the A record to the IP.*



*Brian*

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Re: test bind before moving to production

2014-07-03 Thread Jeremy C. Reed
On Thu, 3 Jul 2014, brian wrote:

> I'm new to bind. I want to be able to test the dns server on my local
> machine before launching it by putting the domain names (ie example.com) in
> my browser and browsing the site.
> 
> 
> Both the dev and production machines are CentOS. I assume I'll need to edit
> the host file to redirect to the local dns. But with this method I'm not
> sure how it will resolve multiple domains (i.e. example.com and
> example2.com).

The host file (/etc/hosts I assume) won't help. You can use 
/etc/resolv.conf and have nameserver line point to your localhost for 
testing.

Or use dig with the @ argument to set the address of the nameserver to 
use. For example, "dig @127.0.0.1 www.example.com". Then also try that 
from outside systems to using the @ with the network interface's 
address.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: test bind before moving to production

2014-07-03 Thread Sten Carlsen


On 03/07/14 16:39, Jeremy C. Reed wrote:
> On Thu, 3 Jul 2014, brian wrote:
> 
>> I'm new to bind. I want to be able to test the dns server on my local
>> machine before launching it by putting the domain names (ie example.com) in
>> my browser and browsing the site.
>>
>>
>> Both the dev and production machines are CentOS. I assume I'll need to edit
>> the host file to redirect to the local dns. But with this method I'm not
>> sure how it will resolve multiple domains (i.e. example.com and
>> example2.com).
> 
> The host file (/etc/hosts I assume) won't help. You can use 
> /etc/resolv.conf and have nameserver line point to your localhost for 
> testing.
> 
> Or use dig with the @ argument to set the address of the nameserver to 
> use. For example, "dig @127.0.0.1 www.example.com". Then also try that 
> from outside systems to using the @ with the network interface's 
> address.
And note that the name server will not be publicly used until it is
published through the whole DNS chain. That means there is no reason you
could not put everything in place even public facing servers - nobody
will use them until referenced properly.

> ___
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
> from this list
> 
> bind-users mailing list
> bind-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
> 

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

   "MALE BOVINE MANURE!!!"
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: test bind before moving to production

2014-07-03 Thread brian
I can't get this to work.  I'm trying to use the test url .  
When I open it in my browser, I get a server not found error.


In /etc/resolv.conf I changed
  nameserver 127.0.0.1
I set:
 chattr +i /etc/resolv.conf
and rebooted and opened the file to verify that it wasn't getting 
overwritten


In /etc/named.conf I added
zone "tst.com" {
type master;
file "/var/named/tst.com.zone";
};

I created the file /var/named/tst.com.zone and added:
$TTL 86400
$TTL604800
@   IN  SOA ns.example.com. root.example.com. (
  1 ; Serial
 604800 ; Refresh
  86400 ; Retry
2419200 ; Expire
 604800 )   ; Negative Cache TTL
;
@   IN  NS  ns.example.com.
ns  IN  A   127.0.0.1

In /usr/local/apache/conf/httpd.conf I added:

  ServerName tst.com
  DocumentRoot /tmp/public_html_tst01

  
   AllowOverride None
   Require all denied
   Options Indexes Includes FollowSymLinks
  

  ErrorLog /tmp/apache_logs/error.log


If I run:
named-checkconf /etc/named.conf
I don't get any output

If I run
named-checkzone tst.com /var/named/tst.com.zone
I get:
zone tst.com/IN: loaded serial 1
OK

I checked the apache error log and it is empty.

Brian
On 07/03/2014 10:39 AM, Jeremy C. Reed wrote:

On Thu, 3 Jul 2014, brian wrote:


I'm new to bind. I want to be able to test the dns server on my local
machine before launching it by putting the domain names (ie example.com) in
my browser and browsing the site.


Both the dev and production machines are CentOS. I assume I'll need to edit
the host file to redirect to the local dns. But with this method I'm not
sure how it will resolve multiple domains (i.e. example.com and
example2.com).

The host file (/etc/hosts I assume) won't help. You can use
/etc/resolv.conf and have nameserver line point to your localhost for
testing.

Or use dig with the @ argument to set the address of the nameserver to
use. For example, "dig @127.0.0.1 www.example.com". Then also try that
from outside systems to using the @ with the network interface's
address.



___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: test bind before moving to production

2014-07-04 Thread Reindl Harald


Am 04.07.2014 04:29, schrieb brian:
> I can't get this to work.  I'm trying to use the test url .  
> When I open it in my browser, I get a server not found error.
> 
> In /etc/resolv.conf I changed nameserver 127.0.0.1
>
> I created the file /var/named/tst.com.zone and added:
> @   IN  NS  ns.example.com.
> ns  IN  A   127.0.0.1

there is no "tst.com" in that zone.file
there is just "ns.tst.com" pointing to 127.0.0.1




signature.asc
Description: OpenPGP digital signature
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Re: test bind before moving to production

2014-07-04 Thread Matus UHLAR - fantomas



Am 04.07.2014 04:29, schrieb brian:

I can't get this to work.  I'm trying to use the test url .
When I open it in my browser, I get a server not found error.

In /etc/resolv.conf I changed nameserver 127.0.0.1

I created the file /var/named/tst.com.zone and added:
@   IN  NS  ns.example.com.
ns  IN  A   127.0.0.1


On 04.07.14 11:36, Reindl Harald wrote:

there is no "tst.com" in that zone.file


actually, there is - the "@" means the current origin (which is the zone name
from config file definition unless you override it).
But it only contains NS record, no A (or )


there is just "ns.tst.com" pointing to 127.0.0.1


--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Your mouse has moved. Windows NT will now restart for changes to take
to take effect. [OK]
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: test bind before moving to production

2014-07-04 Thread Reindl Harald

Am 04.07.2014 12:17, schrieb Matus UHLAR - fantomas:
> 
>> Am 04.07.2014 04:29, schrieb brian:
>>> I can't get this to work.  I'm trying to use the test url .
>>> When I open it in my browser, I get a server not found error.
>>>
>>> In /etc/resolv.conf I changed nameserver 127.0.0.1
>>>
>>> I created the file /var/named/tst.com.zone and added:
>>> @   IN  NS  ns.example.com.
>>> ns  IN  A   127.0.0.1
> 
> On 04.07.14 11:36, Reindl Harald wrote:
>> there is no "tst.com" in that zone.file
> 
> actually, there is - the "@" means the current origin 

tell me something new :-)

[root@ns2:~]$ ls named/zones/ | wc -l
521

> But it only contains NS record, no A (or )

and so there is no "tst.com" in that zone.file as i said

@  IN  A   127.0.0.1

would be the A record




signature.asc
Description: OpenPGP digital signature
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users