a set of rules for OPNsense and PFsense firewalls
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
389 B

#!/bin/sh
if [ "$1" = "" ] ; then
echo Usage:
echo $0 [file.list]
fi
infile=${1}
outfile=${1}.resolved
DNSSERVER=9.9.9.9
echo > ${outfile}.tmp
cat "$infile" | while read LINE ; do
echo "resolving: $LINE"
IP=$(dig @${DNSSERVER} +short "$LINE" | grep -v '\.$')
echo "$IP"
echo "$IP" >> ${outfile}.tmp
echo
done
cat ${outfile}.tmp | grep -v ^$ | sort -u > ${outfile}
rm ${outfile}.tmp