Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Location of the nginx config file that contains the CloudFlare IP addresses.
CF_NGINX_CONFIG="/etc/nginx/sites-available/cloudflare-ips.conf"
# The URLs with the actual IP addresses used by CloudFlare.
CF_URL_IP4="https://www.cloudflare.com/ips-v4"
CF_URL_IP6="https://www.cloudflare.com/ips-v6"
# Temporary files.
CF_TEMP_IP4="/tmp/cloudflare-ips-v4.txt"
CF_TEMP_IP6="/tmp/cloudflare-ips-v6.txt"
# Download the files.
@ssamjh
ssamjh / icecast-kh
Last active April 3, 2023 10:17
icecast-kh init.d Script (Ubuntu 20.04)
#!/bin/bash
### BEGIN INIT INFO
# Provides: icecast-kh
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts the icecast-kh audio streaming server daemon
### END INIT INFO
#
@ssamjh
ssamjh / icecastkh-proxy.conf
Last active September 30, 2023 06:24
icecast-kh Nginx config with IP-Forwarding
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/nginx/ssl/example.com.pem;
ssl_certificate_key /etc/nginx/ssl/example.com.key;