• /// x-108.com in a new style
    /// After more than 4 years it was time to update the forum to the latest version. We also decided on a new design...

Tutorial DNS Server configure - Raspberry PI B+ (1 Viewer)

admin

Administrator
Teammitglied
X-108 Member
SITE-ADMIN
SITE-MOD
Registriert
30 November 2014
Beiträge
113
Punkte Reaktionen
65
Punkte
1.027
Ort
Stuttgart
Country
de
Website
do7psl.de
Verified User
YES
Rufzeichen/Call
noCall
network-environment:
  • 192.168.1.0/24 - home lan network
  • 192.168.1.100 - router
  • 192.168.1.251 - raspberry
  • rpi-dns - hostname of the raspberry
  • 208.67.220.220, 208.67.222.222 - opendns
let´s start Walkingdead

Code:
sudo su
apt-get install bind9
Code:
cd /etc/bind
nano /etc/bind/db.home.lan

content:
Code:
; Use semicolons to add comments.
; Host-to-IP Address DNS Pointers for home.lan
; Note: The extra "." at the end of the domain names are important.
; The following parameters set when DNS records will expire, etc.
; Importantly, the serial number must always be iterated upward to prevent
; undesirable consequences. A good format to use is YYYYMMDDII where
; the II index is in case you make more that one change in the same day.
home.lan. IN SOA raspberry.home.lan. hostmaster.home.lan. (
2015120101 ; serial
8H ; refresh
4H ; retry
4W ; expire
1D ; minimum
)
; NS indicates that raspberry is the name server on home.lan
; MX indicates that raspberry is (also) the mail server on home.lan
home.lan. IN NS rpi-dns.home.lan.
home.lan. IN MX 10 rpi-dns.home.lan.
; Set the address for localhost.home.lan
localhost IN A 127.0.0.1
; Set the hostnames in alphabetical order
rpi-dns IN A 192.168.1.251
router IN A 192.168.1.100
Code:
nano /etc/bind/db.rev.1.168.192.in-addr.arpa

content:
Code:
; IP Address-to-Host DNS Pointers for the 192.168.1 subnet
@ IN SOA rpi-dns.home.lan. hostmaster.home.lan. (
2015120101 ; serial
8H ; refresh
4H ; retry
4W ; expire
1D ; minimum
)
; define the authoritative name server
IN NS rpi-dns.home.lan.
; our hosts, in numeric order
1 IN PTR router.home.lan.
31 IN PTR rpi-dns.home.lan.

Code:
nano /etc/bind/named.conf.options

Code:
forwarders {
208.67.222.222;
208.67.220.220;
};

Code:
nano /etc/bind/named.conf.local

Code:
zone "home.lan" IN {
type master;
file "/etc/bind/db.home.lan";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.rev.1.168.192.in-addr.arpa";
};
 
Zuletzt bearbeitet:

X-Boarder

Crack-Boarder
X-108 Member
Registriert
16 Januar 2015
Beiträge
27
Punkte Reaktionen
8
Punkte
3
Alter
58
Verified User
YES
u can also enter the address of your router (192.168.1.100) because he always refers to the current ip dns server of your provider's :rolleyes:

Code:
nano /etc/bind/named.conf.options

Code:
forwarders {
192.168.1.100;
};
 

Users who are viewing this thread

Oben
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock    No Thanks