I have a connect.sh script in which i control the mac address of the client to check that it is in the list of allowed addresses
I would like the client to receive an AUTH_FAILED code to refuse the connection
Code: Select all
test_macaddress=`grep -r "$IV_HWADDR" /etc/openvpn/macaddress.txt`
if [ ${#test_macaddress} -eq 0 ]
then
(
echo $common_name $IV_HWADDR "MAC_NOK" >>/var/log/openvpn/macaddr.log
exit 1
)
else
(
echo $common_name $IV_HWADDR "MAC_OK" >>/var/log/openvpn/macaddr.log
exit 0
)
fi
how to deny the client connection ?
Thanks for your help
Stéphane