File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / dnsmasq / contrib / reverse-dns / README
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Mar 17 00:56:46 2021 UTC (3 years, 9 months ago) by misho
Branches: dnsmasq, MAIN
CVS tags: v8_2p1, v2_84, HEAD
dnsmasq 2.84

The script reads stdin and replaces all IP addresses with names before
outputting it again. IPs from private networks are reverse looked  up
via dns. Other IP addresses are searched for in the dnsmasq query log.
This gives names (CNAMEs if I understand DNS correctly) that are closer
to the name the client originally asked for then the names obtained by
reverse lookup. Just run

netstat -n -4 | ./reverse_replace.sh 

to see what it does. It needs 

log-queries
log-facility=/var/log/dnsmasq.log

in the dnsmasq configuration.

The script runs on debian (with dash installed) and on busybox.


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>