N
N
NiGP2011-09-14 13:34:01
linux
NiGP, 2011-09-14 13:34:01

Configuring bind9 to work locally with virtual subdomains

Good afternoon. Installed Ubuntu 11.04 The
task is to make virtual subdomains work.
To work on combat servers in the domain control panel, I created an A record with the @ value and everything worked.

On the local machine, put bind9

/etc/bind/named.conf.default-zones /etc/bind/db.wa CHADNT?
zone "site.dev" {
type master;
file "/etc/bind/db.wa";
};



$TTL 3600
site.dev. IN SOA ns1.site.dev root.site.dev. (2010061200 10800 3600 604800 86400)
site.dev. IN A 127.0.0.1
www.site.dev. IN A 127.0.0.1
@ IN A 127.0.0.1


Answer the question

In order to leave comments, you need to log in

5 answer(s)
N
NiGP, 2011-09-14
@NiGP

In general, the problem was solved, but another one arose. works with /etc/resolv.conf but the Internet stops working in general, sites become unavailable, and when the Internet works, but subdomains do not work. And on restart, the contents of resolv.conf are reset
$TTL 604800
@ IN SOA ns.site.dev. root.site.dev. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.site.dev.
@ IN A 127.0.0.1
* IN A 127.0.0.1
ns IN A 127.0.0.1

nameserver 127.0.0.1
nameserver 192.168.1.1

nameserver 192.168.1.1
nameserver 127.0.0.1

A
Andrey Burov, 2011-09-14
@BuriK666

* IN A 127.0.0.1

P
pdev, 2011-09-14
@pdev

And who will write the NS? ns1 in a 127.0.0.1
In addition, it's better then to register the dev root zone and all subdomains to the localhost. it remains only to add records to the web server

R
Ruslan_Y, 2011-09-14
@Ruslan_Y

Local bind only for the local machine - sorry, but like a cannon on sparrows.
Why don't you just use /etc/hosts, it's much easier?

N
NiGP, 2011-09-14
@NiGP

Easier, but for some reason subdomains did not work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question