欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
How to Setup a DNS Server in Ubuntu

How to Setup a DNS Server in Ubuntu

Overview

Would you like to setup a DNS Server in Ubuntu? How about setting up aprivate internal domain name at home? Well, you’ve come to the rightplace. There are number of tutorials on the internet showing you how tosetup a DNS Server with Ubuntu using Bind 9. So, why another how-todocument? That’s a good question. I’ve decided I needed to write asimple tutorial that anyone with a little bit of Linux knowledge wouldbe able to follow. In the process, I hope readers are also able tolearn how DNS works. Ok, let’s jump right to it!

What is DNS?

First of all, let’s cover the basics. What is DNS? DNS stands forDomain Name Server. It’s a service that runs on a server thattranslates humanly recognizable domain names such as www.yahoo.com orwww.google.com into its assigned IP addresses. If the DNS server doesnot recognize the domain name being requested, it will forward thedomain name request to another DNS server and so on until the name isresolved.

A typical DNS request is when someone is accessing a website. Let’suse the www.yahoo.com domain as an example. When a user clicks a Yahoolink or types the Yahoo URL on the address bar of the browser, the DNSserver processes the domain request. If it doesn’t find www.yahoo.comon its DNS table, it will forward the request to another DNS serverwith a higher authority and so on until it finds a server with the URLentry. The IP address information is then sent back to the user’sbrowser. If the domain name is not found, a “server not found” messageis displayed on the browser.

Assumptions

Enough with the DNS background. Let’s now start configuring our ownDNS server. Let’s assume that we have the following: we want to createa private internal domain name called mydomain.com, our private internal network is 192.168.0.x and our router and gateway is set at 192.168.0.1. Let’s assume all devices are going to be configured with static IP addresses.Normally, most computer systems nowadays are configured toautomatically obtain IP addresses from the DHCP server/router. In thisexample, we will use static IP addresses to show how DNS works.Finally, we have 3 computers connected to our network:

  • Ubuntu Server, the DNS server – 192.168.0.9
  • Ubuntu Desktop – 192.168.0.10
  • PC – 192.168.0.11

Instructions

1. To install the DNS server, we need to install Bind 9.

sudo apt-get install bind9

2. Let’s configure Bind. We need to touch 5 files.

We will edit 3 files.

  • /etc/bind/named.conf.local
  • /etc/bind/named.conf.options
  • /etc/resolv.conf

We will create 2 files.

  • /etc/bind/zones/mydomain.com.db
  • /etc/bind/zones/rev.0.168.192.in-addr.arpa

A. First step. Lets add our domain zone – mydomain.com.

sudo vi /etc/bind/named.conf.local
# Our domain zone
zone "mydomain.com" {
type master;
file "/etc/bind/zones/mydomain.com.db";
};
 
# For reverse DNS
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";
};

Save file. Exit.

We just created a new domain. Please note: later we will create twofiles named mydomain.com.db and rev.0.168.192.in-addr.arpa files. Also,notice the reverse IP address sequence in the reverse DNS section.

B. Let’s add the DNS servers from your ISP. In my case, I’m usingComcast DNS servers. You can place the primary and secondary DNSservers here separated by semicolons.

sudo vi /etc/bind/named.conf.options
forwarders {
68.87.76.178;
};

Save file. Exit.

C. Now, let’s modify the resolv.conf file found in /etc and place the IP address of our DNS server which is set to 192.168.0.9.

$ sudo vi /etc/resolv.conf
search mydomain.com.
nameserver 192.168.0.9

D. Now, let’s define the zones.

sudo mkdir /etc/bind/zones
sudo vi /etc/bind/zones/mydomain.com.db
$TTL 3D
@ IN SOA ns.mydomain.com. admin.mydomain.com. (
2007062001
28800
3600
604800
38400
);
mydomain.com. IN NS ns.mydomain.com.
ubuntudesktop IN A 192.168.0.10
www IN CNAME ubuntudesktop
pc IN A 192.168.0.11
gw IN A 192.168.0.1
TXT "Network Gateway"

The TTL or time to live is set for 3 days
The ns.mydomain.com nameserver is defined
ubuntudesktop, pc and gateway are entered as an A record
An alias of www is assigned to ubuntudesktop using CNAME

E. Let’s create a “rev.0.168.192.in-addr.arpa” file for reverse lookup.

sudo vi /etc/bind/zones/rev.0.168.192.in-addr.arpa
$TTL 3D
@ IN SOA ns.mydomain.com. admin.mydomain.com. (
2007062001
28800
604800
604800
86400
)
IN NS ns.mydomain.com.
1 IN PTR gw.mydomain.com.
10 IN PTR ubuntudesktop.mydomain.com.
11 IN PTR pc.mydomain.com.

3. Let’s restart Bind to activate our latest changes.

sudo /etc/init.d/bind9 restart

4. Finally, let’s test our new domain and DNS entries.

Dig

$ dig mydomain.com

Nslookup

nslookup gw

5. That’s it.

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
ubuntu安裝配置DNS server
Linux下搭建DNS服務(wù)器和配置文件(named.conf)祥解
DNS服務(wù)(bind9)配置過(guò)程
Debian下安裝DNS服務(wù)器
Ubuntu下配置NFS服務(wù)器和客戶(hù)端
DNS服務(wù)及基于BIND的實(shí)現
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久