What’s DNS?
DNS (Area Identify Machine)
An IP deal with is equipped to visit each internet deal with at the Web. It’s somewhat tough and tough to stay the IP addresses of those internet addresses one after the other in our minds.
DNS
comes into play right here. It offers a reputation comparable to the IP of every internet deal with, so the names which can be more uncomplicated to switch than IP addresses are the call of the machine that is helping us take into accout. For instance techsoftcenter.com (IP price:
172.104.31.121
)
What’s DHCP?
DHCP (Dynamic Host Configuration Protocol)
is just the provider used to offer IP addresses to the computer systems within the machine and further parameters. The primary goal of
DHCP
is to allow the installer to robotically distribute IP addresses with
DHCP
the server as an alternative of giving IP to particular person gadgets. As well as, any other comfort supplied via the DHCP server is the
NTP Server
.
Default Gateway
and so on. too can assign parameters.
We can use the “
Oracle Undertaking Linux
” running machine for set up. This newsletter additionally applies to different running methods. Suitable with (
Pink Hat
,
CentOS
,
Kali
,
Ubuntu
and so forth).
We can read about our setup processes below two headings, “
DNS Server Configuration
” and “
DHCP Server Configuration
“.
We disable our “
Firewall
” and “
SELinux
” products and services on our server. If our “
Firewall
” and “
SELinux
” products and services might be energetic, we can wish to enable the ports that our products and services will use, so we wish to disable them.
SELINUX = disabled
— We prevent and shut our firewall provider.
# provider iptables prevent
# chkconfig iptables off
# vim / and so on / selinux / config —We open the dossier andset the line under as“disabled”. SELINUX=disabled —We prevent andshut our firewall provider. # provider iptables prevent # chkconfig iptables off |
DNS Server Configuration (BIND DNS)
1. We set up “BIND DNS” applications that we use in our running machine.
2. On our server, we edit our DNS Server deal with on your DNS configuration dossier “
/and so on/named.conf
” and our DNS addresses that it’ll direct when it can’t get to the bottom of the call.
choices {
listen-on port 53 { 127.0.0.1; 192.168.2.120; };
listen-on-v6 port 53 { ::1; };
listing “/var/named”;
dump-file “/var/named/information/cache_dump.db”;
statistics-file “/var/named/information/named_stats.txt”;
memstatistics-file “/var/named/information/named_mem_stats.txt”;
forwarders { 8.8.8.8; 8.8.4.4; };
allow-query { localhost; any; };
recursion sure;
dnssec-enable sure;
dnssec-validation sure;
dnssec-lookaside auto;
/* Trail to ISC DLV key */
bindkeys-file “/and so on/named.iscdlv.key”;
managed-keys-directory “/var/named/dynamic”;
};
logging {
channel default_debug {
dossier “information/named.run”;
severity dynamic;
};
};
zone “.” IN {
sort trace;
dossier “named.ca”;
};
zone “techsoftcenter.com” IN {
sort grasp;
dossier “techsoftcenter.ahead”;
allow-update { 192.168.2.0/24; };
};
zone “2.168.192.in-addr.arpa.” IN {
sort grasp;
dossier “techsoftcenter.opposite”;
allow-update { 192.168.2.0/24; };
};
come with “/and so on/named.rfc1912.zones”;
come with “/and so on/named.root.key”;
come with “/and so on/rndc.key”;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | # vim /and so on/named.conf —We edit the following strains inthe dossier. choices{ hear–onport53{127.0.0.1;192.168.2.120;}; hear–on–v6port53{::1;}; listing“/var/named”; sell off–dossier“/var/named/information/cache_dump.db”; statistics–dossier“/var/named/information/named_stats.txt”; memstatistics–dossier“/var/named/information/named_mem_stats.txt”; forwarders{8.8.8.8;8.8.4.4;}; enable–question{localhost;any;}; recursion sure; dnssec–allow sure; dnssec–validation sure; dnssec–lookaside auto; /* Trail to ISC DLV key */ bindkeys–dossier“/and so on/named.iscdlv.key”; controlled–keys–listing“/var/named/dynamic”; }; logging{ channeldefault_debug{ dossier“information/named.run”; severity dynamic; }; }; zone“.”IN{ sort trace; dossier“named.ca”; }; zone“techsoftcenter.com”IN{ sort grasp; dossier“techsoftcenter.ahead”; enable–replace{192.168.2.0/24;}; }; zone“2.168.192.in-addr.arpa.”IN{ sort grasp; dossier“techsoftcenter.opposite”; enable–replace{192.168.2.0/24;}; }; come with“/and so on/named.rfc1912.zones”; come with“/and so on/named.root.key”; come with“/and so on/rndc.key”; |
3. In our server, we make the essential enhancing operations within the dossier “
/var/named/localdomain.zone
” to be able to make your “Ahead” DNS data.
— We open our dossier and edit it as follows.
Right here we input the pc names and IP Addresses in the environment.
$TTL 86400
@ IN SOA techsoftcenter-srv.techsoftcenter.com. hostmaster.techsoftcenter.com. (
42 ; serial
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimal
IN NS techsoftcenter-srv
localhost IN A 127.0.0.1
techsoftcenter-srv IN A 192.168.2.120
tchsftcntrrac1 IN A 192.168.2.121
tchsftcntrrac2 IN A 192.168.2.122
tchsftcntrrac1-priv IN A 192.168.117.141
tchsftcntrrac2-priv IN A 192.168.117.142
tchsftcntrrac1-priv2 IN A 192.168.117.143
tchsftcntrrac2-priv2 IN A 192.168.117.144
tchsftcntrrac1-vip IN A 192.168.2.131
tchsftcntrrac2-vip IN A 192.168.2.132
tchsftcntrrac-scan IN A 192.168.2.125
tchsftcntrrac-scan IN A 192.168.2.126
tchsftcntrrac-scan IN A 192.168.2.127
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # vim /var/named/techsoftcenter.ahead —We open our dossier andedit it asfollows. Right here we input the pc names andIP Addresses inour surroundings. $TTL86400 @INSOA techsoftcenter–srv.techsoftcenter.com.hostmaster.techsoftcenter.com.( 42;serial 3H;refresh 15M;retry 1W;expiry 1D);minimal INNS techsoftcenter–srv localhost INA127.0.0.1 techsoftcenter–srv INA192.168.2.120 tchsftcntrrac1 INA192.168.2.121 tchsftcntrrac2 INA192.168.2.122 tchsftcntrrac1–priv INA192.168.117.141 tchsftcntrrac2–priv INA192.168.117.142 tchsftcntrrac1–priv2 INA192.168.117.143 tchsftcntrrac2–priv2 INA192.168.117.144 tchsftcntrrac1–vip INA192.168.2.131 tchsftcntrrac2–vip INA192.168.2.132 tchsftcntrrac–scan INA192.168.2.125 tchsftcntrrac–scan INA192.168.2.126 tchsftcntrrac–scan INA192.168.2.127 |
4. As a way to make our Opposite DNS data on our server, we prepare it via making the essential operations within the dossier “
/var/named/0.168.192.in-addr.arpa
”.
— We open our dossier and make the essential preparations.
Right here we create the “opposite” data that we’ve got assigned
We write the remaining digits of IP addresses. The opposite a part of “DNS
Opposite “will whole the characteristic.
$ORIGIN 2.168.192.in-addr.arpa.
$TTL 1H
@ IN SOA techsoftcenter.com. hostmaster.techsoftcenter.com. ( 2
3H
1H
1W
1H )
2.168.192.in-addr.arpa. IN NS root.techsoftcenter.com.
120 IN PTR techsoftcenter.com-srv.techsoftcenter.com
121 IN PTR tchsftcntrrac1.techsoftcenter.com
122 IN PTR tchsftcntrrac2.techsoftcenter.com
131 IN PTR tchsftcntrrac1-vip.techsoftcenter.com
132 IN PTR tchsftcntrrac2-vip.techsoftcenter.com
125 IN PTR tchsftcntrrac-scan.techsoftcenter.com
126 IN PTR tchsftcntrrac-scan.techsoftcenter.com
127 IN PTR tchsftcntrrac-scan.techsoftcenter.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # vim /var/named/techsoftcenter.com.opposite —We open our dossier andmake the essential preparations. Right here we create the“opposite”data that we have assigned We write the remaining digits of IP addresses.The different section of“DNS Opposite “will whole the characteristic. $ORIGIN2.168.192.in–addr.arpa. $TTL1H @INSOA techsoftcenter.com.hostmaster.techsoftcenter.com.(2 3H 1H 1W 1H) 2.168.192.in–addr.arpa.INNS root.techsoftcenter.com. 120INPTR techsoftcenter.com–srv.techsoftcenter.com 121INPTR tchsftcntrrac1.techsoftcenter.com 122INPTR tchsftcntrrac2.techsoftcenter.com 131INPTR tchsftcntrrac1–vip.techsoftcenter.com 132INPTR tchsftcntrrac2–vip.techsoftcenter.com 125INPTR tchsftcntrrac–scan.techsoftcenter.com 126INPTR tchsftcntrrac–scan.techsoftcenter.com 127INPTR tchsftcntrrac–scan.techsoftcenter.com |
5. After completing the operations on our server, we turn on your provider and we take the essential movements to open it robotically when our server begins.
# provider named get started
Producing /and so on/rndc.key:[ OK ] Beginning named: [ OK ]
— For our provider to begin robotically on opening our server
we make the essential surroundings.
# chkconfig named on
—At thislevel,rndc.key iscreated for“securedns”inour server. —Thisprocedure might take some time. # provider named get started Producing/and so on/rndc.key:[OK] Beginning named:[OK] —Forour provider toget started robotically on opening our server we make the essential surroundings. # chkconfig named on |
6. We now have completed the procedures for DNS configuration on our server. Now we input the deal with of this server, which we’ve got configured to “
/and so on/resolv.conf
” on our servers or computer systems that can get to the bottom of the internet names.
seek techsoftcenter.com
nameserver 192.168.2.120
# vim /and so on/resolv.conf —Open the dossier andedit the following We‘re doing. seek techsoftcenter.com nameserver192.168.2.120 |
7. We test the configurations we’ve got made and ensure that they’re operating.
model: 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6_4.4
CPUs discovered: 2
employee threads: 2
selection of zones: 18
debug stage: 0
xfers operating: 0
xfers deferred: 0
soa queries in growth: 0
question logging is OFF
recursive shoppers: 0/0/1000
tcp shoppers: 0/100
server is up and operating
# nslookup techsoftcenter-srv.techsoftcenter.com
Server: 192.168.2.120
Cope with: 192.168.2.120#53
Identify: techsoftcenter-srv.techsoftcenter.com
Cope with: 192.168.2.120
# nslookup tchsftcntrrac-scan.techsoftcenter.com
Server: 192.168.2.120
Cope with: 192.168.2.120#53
Identify: tchsftcntrrac-scan.techsoftcenter.com
Cope with: 192.168.2.126
Identify: tchsftcntrrac-scan.techsoftcenter.com
Cope with: 192.168.2.127
Identify: tchsftcntrrac-scan.techsoftcenter.com
Cope with: 192.168.2.125
# nslookup www.google.com.tr
# nslookup www.google.com.tr
Server: 192.168.2.120
Cope with: 192.168.2.120#53
Non-authoritative solution:
Identify: www.google.com.tr
Cope with: 173.194.44.31
Identify: www.google.com.tr
Cope with: 173.194.44.23
Identify: www.google.com.tr
Cope with: 173.194.44.24
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # rndc standing model:9.8.2rc1–RedHat–9.8.2–0.17.rc1.0.2.el6_4.4 CPUs discovered:2 employee threads:2 quantity of zones:18 debug stage:0 xfers operating:0 xfers deferred:0 soa queries ingrowth:0 question logging isOFF recursive shoppers:0/0/1000 tcp shoppers:0/100 server isup andoperating # nslookup techsoftcenter-srv.techsoftcenter.com Server:192.168.2.120 Cope with:192.168.2.120#53 Identify:techsoftcenter–srv.techsoftcenter.com Cope with:192.168.2.120 # nslookup tchsftcntrrac-scan.techsoftcenter.com Server:192.168.2.120 Cope with:192.168.2.120#53 Identify:tchsftcntrrac–scan.techsoftcenter.com Cope with:192.168.2.126 Identify:tchsftcntrrac–scan.techsoftcenter.com Cope with:192.168.2.127 Identify:tchsftcntrrac–scan.techsoftcenter.com Cope with:192.168.2.125 # nslookup www.google.com.tr # nslookup www.google.com.tr Server:192.168.2.120 Cope with:192.168.2.120#53 Non–authoritative solution: Identify:www.google.com.tr Cope with:173.194.44.31 Identify:www.google.com.tr Cope with:173.194.44.23 Identify:www.google.com.tr Cope with:173.194.44.24 |
Our DNS Server configuration is whole. Now we can do the “DHCP Server” configuration.
DHCP Server Configuration
1. We’re putting in our “DHCP Server” package deal that we can use in our running machine.
2. We prepare it in step with the IP vary that we can distribute within the “
/and so on/dhcp/dhcpd.conf
” dossier that we can use for configuring “
DHCP Server
” in our server, as within the instance under.
Permit booting;
Permit bootp;
Permit client-updates;
authoritative;
subnet 192.168.2.Zero netmask 255.255.255.0 {
possibility routers 192.168.2.1;
possibility subnet-mask 255.255.255.0;
possibility domain-name “techsoftcenter.com”;
possibility domain-name-servers 192.168.2.120;
possibility ntp-servers 192.168.2.120;
default-lease-time 21600;
max-lease-time 43200;
vary dynamic-bootp 192.168.2.100 192.168.2.253;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # vim /and so on/dhcp/dhcpd.conf —We open our dossier andconfigure it asfollows.“possibility”phase, we will distribute toour computer systems we can write choices. Permit booting; Permit bootp; Permit Jstomer–updates; authoritative; subnet192.168.2.0netmask255.255.255.0{ possibility routers192.168.2.1; possibility subnet–masks255.255.255.0; possibility area–call“techsoftcenter.com”; possibility area–call–servers192.168.2.120; possibility ntp–servers192.168.2.120; default–hire–time21600; max–hire–time43200; vary dynamic–bootp192.168.2.100192.168.2.253; } |
3. We commence the “DHCP Server” provider on our server with the settings we make, and when our server is rebooted, we do the essential operations for automated operation.
— For our provider to begin robotically on opening our server
we make the essential surroundings.
# chkconfig dhcpd on
# provider dhcpd get started —Forour provider toget started robotically on opening our server we make the essential surroundings. # chkconfig dhcpd on |
Your DHCP Server configuration is whole. Now, our computer systems within the community surroundings can robotically download IP addresses and different choices from our server that we configure.
I’m hoping it used to be an invaluable article.
perspectives 238