CentOS 7.6 why behave like hosts.deny and hosts.allow?

Axle CentOS 7.6
Task - allow any connections to the server only from specified countries.
What to do:
In the file hosts.deny prescribed ALL: ALL and more there is no rules
In the file hosts.allow prescribed ALL: ALL: spawn /opt/geoip.sh %a and there no more records no.
File /opt/geoip.sh contains this:
#!/bin/bash

# UPPERCASE space-separated country codes to ACCEPT
ALLOW_COUNTRIES="EN-UA"

if [ $# -ne 1 ]; then
 echo "Usage: `basename $0` <ip>" 1>&2
 exit 0 # return true in case of config issue
fi

COUNTRY=`/usr/bin/geoiplookup $1 | awk -F ": "'{ print $2 }' | awk -F, ' { print $1 }' | head -n 1`

[[ $COUNTRY = "IP Address not found" || $ALLOW_COUNTRIES =~ $COUNTRY ]] && RESPONSE="ALLOW" || RESPONSE="DENY"

if [ $RESPONSE = "ALLOW" ]
then
 logger "$RESPONSE connection from $1 ($COUNTRY)"
 exit 0
else
 logger "$RESPONSE connection from $1 ($COUNTRY)"
 exit 1
fi


In the end we have: when connecting via ssh the log connection, country and everything works as it should,
When you connect to a web server on 80 or 443 port no record in the log and there are no restrictions like there are no rules. What am I doing wrong?
March 20th 20 at 11:35
1 answer
March 20th 20 at 11:37
Solution
https://ubuntuforums.org/showthread.php?t=784404

for example, here it is. Apache uses these files.
It's a shame... - rodrick_Denesik commented on March 20th 20 at 11:40

Find more questions by tags CentOS