How to configure DNS Server on Fedora
- by user863873
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)?