Skip to content

Instantly share code, notes, and snippets.

@yeganemehr
Created April 10, 2022 10:30
Show Gist options
  • Save yeganemehr/b6fbab44d92134eb14109327819b91f2 to your computer and use it in GitHub Desktop.
Save yeganemehr/b6fbab44d92134eb14109327819b91f2 to your computer and use it in GitHub Desktop.
Block traffic to cpanel-nginx websites

HOWTO use

Put blocked-all-ips.conf file to /etc/nginx/conf.d/users/{user} directory and then reload nginx (nginx -s reload)

allow 164.132.141.251; # Jeyserver VPN Public IP
deny all;
error_page 403 /custom_403.html;
location = /custom_403.html {
root /etc/suspend-root;
allow all;
internal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment