Загрузка страницы

How to set up a DNS server on Ubuntu

Website
www.Telifox.com

0:00 - Intro
0:13 - Installing VirtualBox and Ubuntu
Download Ubuntu ISO from the website below:
https://ubuntu.com/download
Then you will need to install Virtual Box using the instructions linked below:
https://www.wikihow.com/Install-VirtualBox

1:20 - Creating a new virtual machine
Open Virtual Box and select “new.”
Name: “Ubuntu DNS server 1”
Machine Folder: Your VM folder
Type: Linux
Version: Ubuntu 64-bit
Memory Size: 4 GB
Hard Disk: Create a virtual Hard Disk Now
File Size: At least 30 GB
Hard Disk File type: VDI
Storage on physical hard disk: Fixed Size
Then Click on Create.
Open the Settings for that new virtual machine. Navigate to the network tab. Click on the “adapter 1” tab and change the attached to setting to “bridged adapter.” Then click OK.

4:22 - Installing Ubuntu
Start the new Virtual Machine. Navigate and Select the Ubuntu ISO that you downloaded. Then click on Start.
Select your language and then click on “Install Ubuntu.” Select your keyboard layout. Updates and other software = Normal, Other options = both boxes selected. Installation type = Erase Disk and install Ubuntu. Select your region. Enter your computer name, username, password. Select Log in Automatically to make it easier. Password should be at least 12 characters long with at least one number, one special character, one uppercase letter, and one lowercase letter. Restart server and remove ISO.

11:10 - Installing Additions in Ubuntu
Bring up the terminal and use the following command to install guest additions.
sudo apt-get install virtualbox-guest-additions-iso
enter password
press “y” and “enter” to install
Resize resolution inside your virtual machine to machine your monitor.

13:34 - Installing Bind9 for DNS server
sudo apt install bind9
press “y” and “enter” to install

14:10 - Installing DNS Utilities
sudo apt install dnsutils

14:25 - Configure DNS server
https://ubuntu.com/server/docs/service-domain-name-service-dns

15:00 - Set a static IP address for your server that is on the same IP scheme and subnet as your local network.

16:30 - Caching Name Server Forwarder
sudo nano /etc/bind/named.conf.options
For me I had to add my edge router default gateway, my ISP DNS servers, and google dns servers for this to work. Your case will be different depending on your network.
forwarders {
192.162.2.1;
Your IPS DNS server1;
Your IPS DNS server1;
8.8.8.8;
8.8.4.4;
};
Press ctrl+x at the same time and press “y” and “enter” to save changes.
Then restart service
sudo systemctl restart bind9.service

18:02 - Configure forward zone file:
sudo nano /etc/bind/named.conf.local
#make a new entry#
zone "example.com" {
type master;
file "/etc/bind/db.example.com";
};

19:10 - Now use an existing zone file as a template to create the /etc/bind/db.example.com file:
sudo cp /etc/bind/db.local /etc/bind/db.example.com
replace db.example.com with your domain name.
Press ctrl+x at the same time and press “y” and “enter” to save changes.

19:25 - Edit the new zone file /etc/bind/db.example.com and change localhost.

Change example.com the A record to contain your machines IP address.
Press ctrl+x at the same time and press “y” and “enter” to save changes.
sudo systemctl restart bind9.service

23:30 - Enter the following command
sudo nano /etc/bind/named.conf.local
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192";
};
Replace 1.168.192 with the first three octets of whatever network you are using.

25:00 - Creating file
sudo cp /etc/bind/db.127 /etc/bind/db.192

25:44 - Edit db.192 file
sudo nano /etc/bind/db.192
Change the example.com to match your domain name.
Press ctrl+x at the same time and press “y” and “enter” to save changes.
Restart server
sudo systemctl restart bind9.service

28:20 - Now add your server to resolve.conf file
sudo nano /etc/resolv.conf
nameserver your computer IP address
nameserver 127.0.0.53
search example.com
Press ctrl+x at the same time and press “y” and “enter” to save changes.

28:40 - Testing Server
dig -x 127.0.0.1
ping example.com
PING ns.example.com

30:05 - Now disable IPv6
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

30:45 - Logging server
sudo nano /etc/bind/named.conf.local

logging {
channel query.log {
file "/var/log/named/query.log";
severity debug 3;
};
category queries { query.log; };
};
Press ctrl+x at the same time and press “y” and “enter” to save changes.
sudo mkdir /var/log/named
sudo chown bind:bind /var/log/named
sudo systemctl restart bind9.service
34:57 - Testing on Windows
38:14 - Troubleshooting Tips
41:10 - Install Firewall
sudo apt install ufw
sudo ufw enable
sudo ufw allow 53
sudo ufw allow 80
sudo ufw allow 443
sudo ufw allow Samba
sudo ufw allow Bind9
sudo ufw deny 5900

44:06 - Last final step scan system with Kali.

https://pastebin.com/AZhvPAsT

Видео How to set up a DNS server on Ubuntu канала Telifox
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
23 сентября 2021 г. 11:59:04
00:47:57
Яндекс.Метрика