#!/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"