Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to learn how to configure my home PC server into a web server with domain and host.

My IP is 109.99.141.133 and now points to a phpinfo page host on my home server. My registed domain is: anunta-anunturi.ro

I searched for a tutorial and I've read that I have to configure /etc/named.conf and the file sources for the new zone that I create.

So, from the tutorials, my /etc/named.conf looks like this:

 //
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
        listen-on port 53 { 127.0.0.1; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { localhost; };
        recursion yes;
        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;
        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";
        managed-keys-directory "/var/named/dynamic";
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
zone "anunta-anunturi.ro" IN {
        type master;
        file "/etc/anunta-anunturi.db";
};
zone "." IN {
        type hint;
        file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

My /etc/anunta-anunturi.db file looks like this — I'm not sure if this is okay, or if it's the easy one.

$TTL    86400
anunta-anunturi.ro. IN SOA serveur.anunta-anunturi.ro. root.serveur.anunta-anunturi.ro. (
                                                1997022700 ; Serial
                                                28800      ; Refresh
                                                14400      ; Retry
                                                3600000    ; Expire
                                                86400 )    ; Minumun

        IN              NS              serveur.anunta-anunturi.ro.
        IN              MX      10      mail.anunta-anunturi.ro.

serveur.anunta-anunturi.ro.     IN      A       192.168.1.37
www.anunta-anunturi.ro.         IN      A       192.168.1.37
mail.anunta-anunturi.ro.        IN      A       192.168.1.37

Extra info:

  • At home I receive internet from my ISP through a router. My home PC and server recieve their IP automatically from the router when I start/restart.

  • In my local home network, my server receives the IP 192.168.1.37 from the router.

  • When I enter 109.99.141.133 in my browser, it points to the rooter that forwards port 80 to local IP 192.168.1.37 (my home server)

Questions:

  • Are my two files good?

  • What/where is my nameserver that I need to copy/paste to my top level domain (where I registered my domain: rotld.ro)?

share|improve this question

migrated from stackoverflow.com Dec 7 '11 at 10:39

This question came from our site for professional and enthusiast programmers.

    
Is your IP (the 109... one) static, or it may change ? –  Alex Dec 8 '11 at 23:20

2 Answers 2

Hey if your not familiar with DNS configuration I would look at webmin. It provides a web interface for easily configuring stuff like this and takes out a lot of work.

Once the DNS server is up and running you can manually set your computer to use said DNS server IP to make sure the name resolution is working. Also make sure you have set some forward lookup addresses so you can resolve domains other than your own.

After that you will need to enable port forwarding on port 53 to the internal DNS/webserver (192.168.1.37). Lastly set the NS records for your domain through your domain providers DNS configuration page to your public IP address (109.99.141.133).

I didn't think you NEED two DNS servers but it's probably advised.

share|improve this answer

You need two or more publicly routable DNS servers for your domain.

Back in the day, you could host one yourself and provide the second one through a free service such as Granite Canyon. But Granite Canyon is gone.

If the servers are mentioned by domain name, then you'll need to make sure that you also provide glue records for those servers.

Ask your ISP or registrar if they will host your DNS for you -- hosting it yourself is painful.

share|improve this answer
    
Google DNS have nothing to do with what he needs - google does not hosts domains. –  Alex Dec 8 '11 at 23:19
    
@Alex: Many thanks. Shame on me for skimming too heavily. –  sarnold Dec 8 '11 at 23:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.