I am new and am experimenting with hosting LAMP servers. I have hosted an apache server on a Fedora 24 machine. For fun, I wanted to have a domain name for the server, say,
Now, I figured that having a corresponding name resolving entry on my /etc/hosts file would be of help. And, it worked. I, further, wanted to extend the same for all other machines running on my LAN. While making a similar entry to the corresponding /etc/hosts file of all other computers would have been easier, I wanted to do things differently. I wanted to have a DNS-kind of functionality.
Since I do not want to change the configuration settings of our institution's router, I decided to experiment with dnsmasq after learning about it online.
So, here is how my config files look like-
192.168.1.190 www.testpage.ac.in 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
nameserver 18.104.22.168 nameserver 192.168.1.1
resolv-file=/etc/dnsmasq-resolv.conf interface=enp2s0 listen-address=127.0.0.1
Output from journalctl -u dnsmasq
Mar 29 20:04:26 AUTO dnsmasq: started, version 2.76 cachesize 150 Mar 29 20:04:26 AUTO dnsmasq: compile time options: IPv6 GNU-getopt DBus no-i18n IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop Mar 29 20:04:26 AUTO dnsmasq: reading /etc/dnsmasq-resolv.conf Mar 29 20:04:26 AUTO dnsmasq: using nameserver 22.214.171.124#53 Mar 29 20:04:26 AUTO dnsmasq: using nameserver 192.168.1.1#53 Mar 29 20:04:26 AUTO dnsmasq: read /etc/hosts - 2 addresses
Next, I changed the DNS settings of every other computer on LAN to that of the host machine (192.168.1.190).
/etc/resolv.conf of all other machines
I am able to access www.testpage.ac.in from the host machine(192.168.1.190). I can also access internet from this machine.
I expect to access internet, as I normally do, from every other computer on my LAN, but, am unable to do so. Also, I cannot access the hosted server by its domain-name (www.testpage.ac.in) while I can do so if I enter its IP-address.
I believe that the computers on my LAN are not able to resolve the DNS queries properly which is effectively causing trouble. Any insight on the issue will be greatly appreciated.