mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
32 lines
616 B
Bash
Executable File
32 lines
616 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ "$REASON" = "connect" ];then
|
|
iptables -S|grep ocserv-fw|grep 10.48.59.1|grep ACCEPT|grep 53
|
|
if test $? != 0;then
|
|
echo "dns was not accepted"
|
|
exit 1
|
|
fi
|
|
|
|
iptables -S|grep ocserv-fw|grep 10.47.59.0/24|grep ACCEPT
|
|
if test $? != 0;then
|
|
echo "route was not accepted"
|
|
exit 1
|
|
fi
|
|
|
|
iptables -S|grep ocserv-fw|grep 10.46.59.0/24|grep DROP
|
|
if test $? != 0;then
|
|
echo "route was not dropped"
|
|
exit 1
|
|
fi
|
|
|
|
ip6tables -S|grep ocserv-fw|grep "fd91:6d87:7441:dc6a::/64"|grep ACCEPT
|
|
if test $? != 0;then
|
|
echo "route6 was not accepted"
|
|
exit 1
|
|
fi
|
|
|
|
touch /tmp/follow-up-script-was-run
|
|
fi
|
|
|
|
exit 0
|