access from out side lan name server resolve problem

Issues related to configuring your network
Post Reply
nike
Posts: 72
Joined: 2018/05/07 14:05:24

access from out side lan name server resolve problem

Post by nike » 2018/06/02 13:51:05

I have configured a centos 7 DNS server .It is working fine within LAN i.e. name server to ip and vice-versa but not access from out side the LAN using internet by name .moreover i can access using public ip like <http://x.x.x.x/>.if put host name
it is not working anyone can help to solve the issue....
here is my config ....

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html

options {
listen-on port 53 { 127.0.0.1; any; };
// listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };

forwarders {
8.8.8.8;
8.8.4.4;
};
forward only;


/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion yes;

dnssec-enable yes;
dnssec-validation yes;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";

pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

include "/etc/named/named.conf.local";



--------------------
zone "myserver.com" IN {
type master;
file "/etc/named/zones/fwd.myserver.com";
allow-update {none;};
allow-query {any;};
};

zone "168.192.in-addr-arpa" IN {
type master;
file "/etc/named/zones/rev.myserver.com";
allow-update {none;};
allow-query {any;};
};


-------------------------------

$TTL 604800
@ IN SOA myserver.com admin.myserver.com. (
3 ;serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
; name servers - NS records
IN NS myserver.com.
IN NS myserver.com.

myserver.com. IN A 192.168.0.221


$TTL 604800
@ IN SOA myserver.com. admin.myserver.com. (
3 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; name servers
IN NS myserver.com.
IN NS myserver.com.

; PTR Records myserver.com
x.x IN PTR myserver.com. ; <public ip>

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: access from out side lan name server resolve problem

Post by lightman47 » 2018/06/03 21:37:05

may not help, but when I wish to access my server from outside I need to specify it's name. I have dyn-dns and do this to get to my machine called 'linux'

http://linux.mydyn-dnsdomainname.com

Post Reply