Ehud
Basic Pleskian
- Server operating system version
- Linux/Ubuntu
- Plesk version and microupdate number
- Plesk Obsidian
Hi,
I would like to check IPs connecting ports as 80 and 443, on real-time, against data base of abusing IPs, as abuseupdb.com.
I have an API key, which allows curl checks. A test may look like this:
Where the results would look like this:
I also use ModSecurirty, that enables LUA integration. This is done via a call of @inspectFile, which may call for Pearl of LUA files.
Note: I'm currently not asking about a check a 10,000 IPs downloaded list, but of a real time check. A check against a downloaded partial list should be possible via CSF.
May I ask if you would know exactly how to create a real-time, one-time-per IP's session, check of remore_addr IP connecting to the server (ports 80/443?) against such abuseipdb, including setting comfort level for the IP being abusive and fetching data from curl JSON results?
I would like to check IPs connecting ports as 80 and 443, on real-time, against data base of abusing IPs, as abuseupdb.com.
I have an API key, which allows curl checks. A test may look like this:
curl -G https://api.abuseipdb.com/api/v2/check \
--data-urlencode "ipAddress=118.25.6.39" \
-d maxAgeInDays=90 \
-d verbose \
-H "Key: my_key" \
-H "Accept: application/json"
Where the results would look like this:
{"data":{"ipAddress":"118.25.6.39","isPublic":true,"ipVersion":4,"isWhitelisted":false,"abuseConfidenceScore":0,"countryCode":"CN","usageType":"Data Center\/Web Hosting\/Transit","isp":"Tencent Cloud Computing (Beijing) Co. Ltd","domain":"tencent.com","hostnames":[],"countryName":"China","totalReports":0,"numDistinctUsers":0,"lastReportedAt":"2022-03-29T11:50:40+00:00","reports":[]}}
I also use ModSecurirty, that enables LUA integration. This is done via a call of @inspectFile, which may call for Pearl of LUA files.
SecRule FILES_TMPNAMES "@inspectFile /etc/apache2/modsecurity.d/modsec_clamav.pl" \
"id:'99999932471', \
phase:2, \
t:none, \
deny, \
log, \
msg:'Infected File upload detected', \
tag:'MALICIOUS_SOFTWARE/VIRUS'"
Note: I'm currently not asking about a check a 10,000 IPs downloaded list, but of a real time check. A check against a downloaded partial list should be possible via CSF.
May I ask if you would know exactly how to create a real-time, one-time-per IP's session, check of remore_addr IP connecting to the server (ports 80/443?) against such abuseipdb, including setting comfort level for the IP being abusive and fetching data from curl JSON results?