dns-scripts/update-public-acl.sh

17 lines
309 B
Bash
Executable File

#!/bin/sh
. ./dns-functions.sh
IncludeFile="$1"
rm -f "$IncludeFile"
{
echo "acl icvpnrange {"
echo " icvpnlocal;"
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'
echo "};"
} > "$IncludeFile"