Skip to content

Instantly share code, notes, and snippets.

View literally1984's full-sized avatar

literally1984 literally1984

View GitHub Profile
OopsieWoopsie /
Created October 23, 2020 23:43
Only allow CloudFlare connections to your web server
# This script downloads the actual list of CloudFlare's IPv4/6 ranges
# and allows them to connect to the 443 port (HTTPS) and drops
# connections from other addresses.
# This is to prevent DDoS attacks and attackers from using the "Host"
# header to identify your server backend address.
# download the lists and remove the trailing newline
ranges4=$(curl -s | head -c -1)
ranges6=$(curl -s | head -c -1)
wavezhang /
Last active April 10, 2024 16:21
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie"