• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..27-Nov-201523

READMEH A D27-Nov-2015611

reverse_replace.shH A D27-Nov-20152.6 KiB

README

1The script reads stdin and replaces all IP addresses with names before
2outputting it again. IPs from private networks are reverse looked  up
3via dns. Other IP adresses are searched for in the dnsmasq query log.
4This gives names (CNAMEs if I understand DNS correctly) that are closer
5to the name the client originally asked for then the names obtained by
6reverse lookup. Just run
7
8netstat -n -4 | ./reverse_replace.sh 
9
10to see what it does. It needs 
11
12log-queries
13log-facility=/var/log/dnsmasq.log
14
15in the dnsmasq configuration.
16
17The script runs on debian (with ash installed) and on busybox.
18
19