Use Bind9 as your DNS forwarder

  Рет қаралды 28,356

Linux Tech School

Linux Tech School

3 жыл бұрын

Use Bind9 as your DNS forwarder
Hi everyone,
In this video I'll install BIND9 on Ubuntu Server and configure as my local DNS forwarder.
This solution increases efficiency because we save internet bandwidth by storing locally DNS resolutions in BIND9 local cache.
I'll have to disable systemd-resolved to switch to this new solution and demonstrate local resolutions on Ubuntu Server and MACOS as my client, using Virtualbox Host-only network connection.
Here are my commands:
1 - Install BIND9 package
apt install bind9
2 - Enter BIND9 config folder
cd /etc/bind/
3 - Edit options file to add forwarders 1.1.1.1 and 8.8.8.8
nano named.conf.options
4 - Restart BIND9 after configuring it
systemctl restart bind9
5 - First test
dig @127.0.0.1 linux.org
6 - Change local DNS server
Temporary Solution for Demonstration - runtime:
nano /run/systemd/resolve/stub-resolv.conf
Permanent Solution:
mv /etc/resolv.conf /etc/resolv.conf.systemd
nano /etc/resolv.conf
insert line:
nameserver 127.0.0.1
7 - Stop systemd-resolved
systemctl stop systemd-resolved
8 - Disable systemd-resolved from boot start
systemctl disable systemd-resolved
9 - Add ufw firewall rule for DNS protocol
ufw allow 53/udp
10 - Monitor dns traffic for testing purposes
tcpdump -vv -n -i enp0sN port53
NOTE: N is yout ehternet interface number
11 - Final test - DNS query
dig linux.org
I hope you enjoy this video. Please comment below for any questions or sugestions.
Thanks!
Regards,
LinuxTechSchool

Пікірлер: 16
@linuxtechschool4841
@linuxtechschool4841 3 жыл бұрын
Hi, For the video I edited the runtime file. All systemd auto-generated files state the "don't edit this file" message. Forgot to mention the final method to replace the symlink with a permanent /etc/resolv.conf (just mentioned its historic role on DNS). Here are the commands to do so. Temporary Solution for Demonstration(runtime): nano /run/systemd/resolve/stub-resolv.conf Permanent Solution: mv /etc/resolv.conf /etc/resolv.conf.systemd echo "nameserver 127.0.0.1" > /etc/resolv.conf This way it will survive reboots. Regards!
@Weirlive
@Weirlive 2 жыл бұрын
such a great video, thanks!!!
@assakurayoh
@assakurayoh 2 жыл бұрын
Preeeetty coool
@johannes5523
@johannes5523 5 ай бұрын
Hi, great video. By the way, the music in the background sound nice. Please give me a hint :)
@linuxtechschool4841
@linuxtechschool4841 5 ай бұрын
Hi, is it from garage band library. 😉
@silva.christian
@silva.christian 2 ай бұрын
hi dear, exist any tools monitoring this system? for example in Unbound exist "unbound-control stats". in the Bind9 have anyway? thank so much
@ghaithraheem9334
@ghaithraheem9334 Жыл бұрын
how I upgrade bind from 9.16.1 to 9.16.38 in real environment?
@bryantonojeta5064
@bryantonojeta5064 Жыл бұрын
Not really informative on setting up dns .. mine isn't working.
@takasunmc
@takasunmc 2 жыл бұрын
thank you, thank you, thank you. I waste hours and hours trying to find out why my virtualhost not showing my site and zone that i create. When I applay this settings it work from first try.
@linuxtechschool4841
@linuxtechschool4841 Жыл бұрын
Glad it helped!
@hayzeproductions7093
@hayzeproductions7093 Жыл бұрын
Curious, 1:40 Can you use domains instead of IP's for forwarders? This would save me a ton of headaches.
@JivanPal
@JivanPal 10 ай бұрын
No, because that's a catch-22 / cyclical dilemma. That is, in order to resolve domain names to IP addresses, you need to know a DNS server. But you're suggesting that the DNS server you want to use should be determined by a domain name, so how will you resolve that name to an IP address in the first place?
@cyberdolphin7349
@cyberdolphin7349 3 ай бұрын
Your stupid bind9 tutorial killed my Magento installation 🤬
@dvbteam1100
@dvbteam1100 2 жыл бұрын
so so speed bro not sweetable for beginners to watch this .!!!!
@linuxtechschool4841
@linuxtechschool4841 2 жыл бұрын
Sorry for that!! Leave any questions here please! Thanks.
You want a real DNS Server at home? (bind9 + docker)
32:31
Christian Lempa
Рет қаралды 249 М.
How To Install And Configure DNS Server In Linux
1:02:09
Tech Tutorials - David McKone
Рет қаралды 63 М.
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 67 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 34 МЛН
Local DNS with Dnsmasq running in Ubuntu LXC - Proxmox tutorial series
17:59
Deploying BIND DNS for your Home Lab - Part 1
25:45
Eddie Jennings
Рет қаралды 21 М.
Automate local DNS with Bind and Terraform
20:56
Christian Lempa
Рет қаралды 55 М.
Installation DNS-server on Linux Ubuntu
18:15
Stanislav Kuznetsov
Рет қаралды 31 М.
Create DNS forward & reverse zones using BIND9
31:04
Linux Tech School
Рет қаралды 2,4 М.
Host Your Own Encrypted DNS Server
24:21
Mental Outlaw
Рет қаралды 120 М.
Learn Windows Server DNS in Just 20min
20:49
Andy Malone MVP
Рет қаралды 81 М.
What's On My Home Server? Storage, OS, Media, Provisioning, Automation
27:30
Wolfgang's Channel
Рет қаралды 1,1 МЛН
DDNS on a Raspberry Pi using the Cloudflare API (Dynamic DNS)
11:44
NetworkChuck
Рет қаралды 346 М.
Здесь упор в процессор
18:02
Рома, Просто Рома
Рет қаралды 436 М.
НОВЫЕ ФЕЙК iPHONE 🤯 #iphone
0:37
ALSER kz
Рет қаралды 337 М.