How to setup GeoIP to prevent access from other countries then PL
sudo yum install geoip-bin geoip-database
sudo dnf install GeoIP* geoipupdate
vim /usr/local/bin/ipfilter.sh
chmod +x /usr/local/bin/ipfilter.sh
sshd: ALL
sshd: ALL: aclexec /usr/local/bin/ipfilter.sh %a
https://www.miyuru.lk/geoiplegacy
https://dl.miyuru.lk/geoip/maxmind/country/maxmind4.dat.gz
cd /usr/share/GeoIP/ as GeoIP.dat
vim /etc/GeoIP.conf
add:
# GeoIP.conf file - used by geoipupdate program to update databases
# from http://www.maxmind.com
AccountID YOUR_ACCOUNT_ID_HERE
LicenseKey YOUR_LICENSE_KEY_HERE
EditionIDs YOUR_EDITION_IDS_HERE
Typically you should run geoipupdate weekly. One way to achieve this is to use cron. Below is a sample crontab file that runs geoipupdate on each
Wednesday at noon:
# top of crontab
MAILTO=your@email.com
0 12 * * 3 BIN_DIR/geoipupdate
# end of crontab