16 lines
354 B
Bash
Executable File
16 lines
354 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. ./dns-functions.sh
|
|
|
|
IncludeFile="$1"
|
|
|
|
rm -f "$IncludeFile"
|
|
|
|
echo "acl icvpnrange {" > "$IncludeFile"
|
|
echo " icvpnlocal;" >> "$IncludeFile"
|
|
|
|
echo "dump" | nc ::1 33123 | \
|
|
sed -e '/add route/!d;/installed yes/!d;/\(from ::\/0\|from 0\.0\.\0\.0\/0\)/d;' | \
|
|
sed -ne 's/^.*from \(\S\+\).*/\t\1;/p' >> "$IncludeFile"
|
|
echo "};" >> "$IncludeFile"
|