Code Snippet

Just another Code Snippet site

[OVH] Configure Domain DNS with Dedicated Server


Domain : example.com
Server IP : 123.456.789
Server name : vps123456.ovh.net


OVH Manager Console :

Domain side (example.com)

Domaine & DNS > Serveurs DNS

Primaire : vps39197.ovh.net    
Secondaire : sdns2.ovh.net

Domaine & DNS > Zone DNS

Champ : example.com
Type : A
Cible : 123.456.789

Server Side

cd /etc/bind
vi named.conf.local

Add a new Zone :

zone "example.com" {
type master;
file "/etc/bind/db.example.com";
allow-transfer {213.186.33.199;};
allow-query{any;};
notify yes;
};

213.186.33.199 => secondary OVH DNS

Edit named.conf.options :
replace

listen-on { 127.0.0.1; };

by

listen-on {any;};

Edit /etc/bind/db.example.com :

; example.com
$TTL    3600
@   IN  SOA vps123456.ovh.net. root.example.com. (
2011020906 ; SERIAL
3600; REFRESH
15M; RETRY
1W; EXPIRE
600 ) ; Negative Cache TTL
;
; NAMESERVERS
;
example.com. IN       NS       vps123456.ovh.net.
example.com. IN       NS       sdns2.ovh.net.
;
; Nodes in domain
;
www       IN A         123.456.789
mail      IN A         123.456.789
ns1       IN A         123.456.789
smtp      IN A         123.456.789
pop       IN A         123.456.789
ftp       IN A         123.456.789
imap      IN A         123.456.789
example.com.   IN  A   123.456.789
example.com.   IN  MX  10 mail.example.com.
;
; subdomains
;
*.example.com. IN A 123.456.789

Reload config :

/etc/init.d/bind9 reload

Check no errors :

named-checkconf -z

Try :

nslookup example.com vps123456.ovh.net

, , , , ,


Comments are currently closed.