Private Nameservers in Webmin

From vpsget wiki
Jump to: navigation, search

If you want to set up nameservers you need two dedicated IP addresses from ISP or hosting provider.

Assume you have registered domain name "domain.com", you have two IP addresses: 1.2.3.4 and 5.6.7.8. And your server's hostname is "server1.domain.com".

Step 1. Registering name servers.

Login to your domain name control panel (registrar) and register child name servers:

1.2.3.4 ns1.domain.com
5.6.7.8 ns2.domain.com

Exact way of registering child name servers depends on your registrar and can be easily found in the Internet.

Step 2. Configure BIND server

Login to your webmin panel using url:

http://YourIP:10000 or https://YourIP:10000

Click on the "BIND DNS Server" under "Servers" category and select "Create master zone".

Fill the fields:

Domain name / Network: domain.com
Master server: server1.domain.com
Email address: root@domain.com (or any email you want)

Press "Create".

Now you are in your master zone control panel. Press "Address" and set A Records:

domain.com. 1.2.3.4
server1.domain.com. 1.2.3.4
ns1.domain.com. 1.2.3.4
ns2 domain.com. 5.6.7.8
Note that dot "." at the end of domain name is necessary.

You can also add any subdomains you need, for example: ftp.domain.com, www.domain.com, mail.domain.com etc.

Return to BIND main page with "BIND DNS Server" link at the left webmin menu.

Select "Addresses and Topology" and set the value of "Addresses" string to "any" instead of "127.0.0.1".

Select "Zone Defaults" and set "Allow queries from.." to "default" instead of "127.0.0.1".

Start BIND.

Step 3. Update name servers

Now go to your registrars control panel and update nameservers for your domain to ns1.domain.com and ns2.domain.com.

Note that full propagation may take up to 24 hours and you domain may be unreachable from some ISPs.