Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env bash
- wget -q https://raw.githubusercontent.com/ipverse/rir-ip/master/country/jp/ipv4-aggregated.txt https://raw.githubusercontent.com/ipverse/rir-ip/master/country/jp/ipv6-aggregated.txt
- cat << 'EOF' > .htaccess
- <Limit POST>
- Order Allow, Deny
- EOF
- cat ipv4-aggregated.txt ipv6-aggregated.txt | sed -e '/^\#/d' | sed -e 's/^/Allow from /g' >> .htaccess
- cat << 'EOF' >> .htaccess
- Deny from all
- </Limit>
- EOF
- rm ipv4-aggregated.txt ipv6-aggregated.txt
Advertisement
Add Comment
Please, Sign In to add comment