Forum Moderators: open
ASN is equal to Amazon's ASN
AND
User agent does not equal Duckduckgo
OR........
RewriteCond %{REMOTE_ADDR} ^18\.(3[2-9]|[4-9]\d|[12]\d\d)\. [OR] # 18.32.0.0 - 18.255.255.255 no ASN!
RewriteCond %{REMOTE_ADDR} ^98\.6[8-9]\. [OR] # 98.68.0.0 - 98.69.255.255 no ASN!
RewriteCond %{REMOTE_ADDR} ^110\.238\.(12[89]|1[3-9]\d|2\d\d)\. [OR] # 110.238.128.0 - 110.238.255.255 no ASN!
RewriteCond %{REMOTE_ADDR} ^119\.13\.(12[89]|13\d|14[0-3])\. [OR] # 119.13.128.0 - 119.13.143.255 no ASN!
RewriteCond %{REMOTE_ADDR} ^136\.[12]\. [NC] # 136.1.0.0 - 136.2.255.255 no ASN!
wget https://bgp.tools/table.jsonl ; grep ':16509' table.jsonl
#!/bin/sh
#
## Retrieve Amazon's IPv4 CIDR list.
## First light 25-Dec-23 ----- Marvin Jones
##
## Sort using -V to get the file in numerical CIDR seq.
## Sort using -u because Amazon's list is chock full
## of duplicate CIDRs.
## There are also overlapping CIDRs, but those will
## be cleaned up by `aggregate` when we build the
## MASTER_block_lst
# Get and process the Amazon's CIDRs
/usr/local/bin/curl -s https://ip-ranges.amazonaws.com/ip-ranges.json \
| /usr/local/bin/jq -r '.prefixes | .[].ip_prefix' \
| /usr/bin/grep -v null \
| /usr/bin/sort -uV > /home/REDACTED/pf_files/block_amazon
exit 0
Wow, someone is still using .htaccess, I’m surprisedIf one is on shared hosting on an Apache server, what else would one use for access control?
SetEnvIf Remote_Addr ^{numbers here} bad_range=$0
BrowserMatch {name here} !bad_range
Require env bad_range