configuration methods are used for domain name servers.
Pure Cache Server
The pure cache server runs the Domain Name Server software, but does not have a Domain Name Server database file. It records every data obtained from the remote Domain Name Server to answer future queries for the same information.
Three basic configuration files required for a pure Cache Server:
/Etc/named. conf
/Var/named. ca
/Var/named. local
Create or modify/etc/named. conf:
// Generated by name
;
Forwarders {};
// Default is no forwarders
Topology {localhost; localnets ;};
// Prefer local nameservers
Listen-on port 53 {any ;};
// Listen for queries on port 53 on
// Any interface on the system
// (I. e. all interfaces).
// "Port 53" is optional; if you
// Don't specify a port, port 53
// Is assumed.
/*
* Interval Timers
*/
Cleaning-interval 60;
// Clean the cache of expired RRs
// Every 'cleaning-interval' minutes
Interface-interval 60;
// Sc
:
Chkconfig -- add ipchains
Set ipchains to auto start
Next, check whether the ipchains configuration file/etc/sysconfig/ipchains exists. If this file does not exist, ipchains
It does not take effect even if it is set to automatic start. The default ipchains configuration file is as follows:
# Firewall configuration written by lokkit# Manual customization of this file is not recommended.# Note: ifup-post will punch the current nameservers through# Fir
In Debian, configure the network-the Linux Release Technology-Debian information. The following is a detailed description. 1. Configure IP address and DNS (modify the/etc/network/interfaces file)
Auto lo
Iface lo inet loopback
# Description: static ip
Auto eth0
Iface eth0 inet static
Address 192.168.1.119
Netmask 255.255.255.0
Gateway 192.168.1.1
Dns-nameservers 192.168.1.11
# Description: dynamic ip
# Auto lo
# Iface lo inet loopback
#
domain name corresponding IP will automatically check the user computer system Hosts file DNS cache if there is a corresponding IP domain name;3) Router CacheWhen the browser and the system cache do not have the domain name corresponding IP into the router cache check, the above three steps are the client side of the DNS cache;4) ISP (Internet service provider) DNS CacheWhen the domain name corresponding IP address is not found on the customer service side, it will be queried in the ISP DNS
, to achieve the transfer of TCP DNS, the program simple operation convenient, more recommended.However, Tcp-dns-proxy itself has some problems, such as the lack of a complete caching mechanism, resulting in slower query speed, program stability and anti-concurrency generally. So I think I can have a more stable solution?Finally, Bind is selected as the old DNS server, the use of forward features can be relatively easy to implement DNS forwarding. The following modifications are configured under
RESOLV.CONF Configuration Information Loss resolutionConfigure DNS, modify/etc/resolv.conf, restart service network Restart after modification, modify/etc/resolv.conf information loss, please take a look.[Code] pre-modification configuration# No nameservers found; Try putting DNS servers into your# ifcfg files in/etc/sysconfig/network-scripts like so:## dns1=xxx.xxx.xxx.xxx# dns2=xxx.xxx.xxx.xxx# domain=lab.foo.com Bar.foo.comBaidu on the InternetWork
, 4929.428, 0.004}]}.{[{{inet,gethostbyname_tm,4}, 1, 4929.428, 0.004}], { {inet,gethostbyname_tm_native,4}, 1, 4929.428, 0.004}, % [{{inet_gethost_native,gethostbyname,2}, 1, 4929.423, 0.002}, {{inet,gethostbyname_tm,5}, 1, 0.001, 0.001}]}.
From the above perspective, the block is in inet_tcp: getaddrs. Read the source code and find that the native DNS is called.
7. Erlang DNS
Dig domain name, dnsserver is an
######################################## ############
# DNS-* options are implemented by the resolvconf package, if installed (DNS settings)
# DNS-nameservers 61.153.177.196 61.153.177.197
# DNS-search fireteam.org
######################################## ############
# Sudo gedit/etc/resolv. conf
# Set DNS server (multiple DNS servers can be set)
# Nameserver 192.168.1.1
######################################## ############
#------------------------
hosts file. If the record exists, the corresponding IP address is directly resolved. At this time, you do not need to request the DNS server.
Easy for small LAN users to use internal devices: Because the LAN is too small, you do not have to set up a DNS server.
Network Test Tool pingPing 192.168.31.182-c 3 // only send 3 packetsBytes
The host command is used to query DNS records. If the domain name is used as the host parameter, the IP address of the domain name is returned.BytesThe pre
first parameter with no options.ifupThis name will also be used as the initialization logic name of the interface, unless it is specified with a Suffix in the format of "= LOGICAL ",ifup"LOGICAL" is used as the initialization logic name of the interface.Nic configuration instance loopback parameter configuration
# The loopback network interface (configure The loopback port) # auto lo on The boot interface # configure The loopback interface as The loopback port iface lo inet loopbackDHCP Configu
Linux networking notes, linux networking
I always thought that what I said about linux was not enough in fact to keep up with the ever-changing needs of applications.
There are too many errors in the existing documents. After all, however, after years of accumulation, it is still possible to organize an accurate document.
Local IP settings:
# Static interfaceAuto eth0Iface eth0 inet staticAddress 192.168.127.11Netmask 255.255.255.0Network 192.168.127.0Broadcast 192.168.127.255Gateway 192.168.127
:# Firewall configuration written by lokkit# Manual customization of this file is not recommended.# Note: IFUP-post will punch the current nameservers through# Firewall; such entries will ** not * be listed here.: Input accept: Forward accept: Output accept-A input-s 0/0-D 0/0-I lo-J accept# Allow HTTP, FTP, SMTP, ssh, domain via TCP; domain via UDP-A input-p tcp-s 0/0-D 0/0 POP3-y-J accept-A input-p tcp-s 0/0-D 0/0 http-y-J accept-A input-p tcp-s 0/0
An Ubuntu server version is installed, a static IP address is configured, and DNS is configured. However, after the restart, it is found that there is still a problem when connecting the outside network.Look for a bit, is the problem of DNS.This can be handled:cat /etc/network/192.168. 21.11 255.255. 255.0 192.168. 21.1 dns-nameservers 8.8.8.8Note that the key is that the last line needs to be configured here.I was previously configured in/etc/resol
Ubuntu set static IP address, not on the networkThe article also mentions that if you add DNS in/etc/resolv.conf, because Ubuntu has a resolvconf service, if you restart it, then/etc/resolv.conf content will be modified to the default appearance, the file also has the hint text: "DoNot edit this FILE by HAND--YOUR changes would be overwritten ", so you cannot modify/etc/resolv.conf directly.Another thing to note is that/etc/resolv.conf is actually a link, it is really pointing to the/etc/resolvc
new grub file using the following command.$ sudo grub-mkconfig-o/boot/grub/grub.cfggenerating grub configuration file ... Warning:setting grub_timeout to a Non-zero value when grub_hidden_timeout are set is no longer supported. Found Linux Image:/boot/vmlinuz-4.4.0-15-genericfound initrd Image:/boot/initrd.img-4.4.0-15-genericfound memtest86 + Image:/memtest86+.elffound memtest86+ Image:/memtest86+.bindoneEdit the interface file and the network device name so, you'll have a static IP address fo
inet StaticAddress 192.168.44.100Netmask 255.255.255.0Network 192.168.44.0Broadcast 192.168.44.255Gateway 192.168.44.2Dns-nameservers 192.168.44.2Press CTRL + Z to save Ctrl+x exit$GT;CAT interfacesRestart Network Service: $>/etc/init.d/networking Restart reboot successful static IP configuration succeededThe configuration of the Ubuntu server from DHCP to static IP (sometimes the situation where static IP cannot be configured may be a bug in the sys
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.