M
M
Mark Ivanych2015-05-22 11:29:17
Domain Name System
Mark Ivanych, 2015-05-22 11:29:17

How to configure BIND 9 for LAN only?

Hello, OC Debian 7.
I would like to configure the ability to access a local site from a phone or other computer not by IP, but by domain, for example, host1.loc The
dsl-2640u router hangs on 192.168.1.1 and distributes WiFi
Apache is available on 192.168.1.2
Now for files :

gksu gedit /etc/resolv.conf
# Generated by NetworkManager
domain Home
search Home
nameserver 192.168.1.1

Now, if you comment out everything in resolv.conf, the following commands start working, and the host.loc domain becomes available on the same machine.
$ nslookup host.loc
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	host.loc
Address: 192.168.1.2

$ nslookup 192.168.1.2
Server:		127.0.0.1
Address:	127.0.0.1#53

2.1.168.192.in-addr.arpa	name = host.loc.

1. Tell me why the domain is not visible from the phone?
2. Why do you have to comment resolv.conf ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
microphone, 2015-05-22
@iormark

You put bind 9 (caching) in LAN, you set up an apishnik with your DNS server (bind 9) in the network settings of the client device (bind 9) and you get the result.
In the bind config there is a parameter that can be used to specify on which network interface to listen for requests, from which range of APIs requests can / cannot be made.
+ Due to NAT (from the Internet), it is difficult to access your DNS server, therefore, be afraid of external attacks ....
There are an ocean of recipes on the Internet, there are chewed materials for both schoolchildren and understanding people.
Answers:
1) your DNS is not registered on the phone .
2) because the order of conversion of the apishnik-name in the system is not set. (like there is a set of services that can do this BIND resolv samba ..........)

S
ShamblerR, 2015-05-22
@ShamblerR

Use the first version of the DNS server, which is still supported by all OSes, in fact, it's not even a daemon at that time the question about the daemon was not going on, it's a regular file and it's called /etc/hosts
, write it down and enjoy ;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question