This post about how to set up fake DNS on Kali Linux, which can help when remotely testing resources which are not available in public DNS. Of course first thought is to add record in /etc/hosts file. But it is not enough, because most tools still use DNS resulotion to determine target and will fail if you use just /etc/hosts file.
For this purpose we will use "dnsmasq" utility.
We just need to create /etc/dnsmasq.conf file (if not created already) and add specfic DNS record:
After we just need to change /etc/resolv.conf to use localhost as DNS server.
P.S. If you need to leave DNS resoving for other sites too, so you need to add different "resolv-file" in /etc/dnsmasq.conf. Syntaxis is:
resolv-file=/etc/resolv.conf.localhost (or any other file).
No comments:
Post a Comment