All Projects → theraw → The World Is Yours

theraw / The World Is Yours

Nginx L7 DDoS Protection! And many more features 💥 ⚡️

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to The World Is Yours

Docker Oidc Proxy
Docker Image built on Alpine Linux for secure OpenID Connect (OIDC) proxy authentication
Stars: ✭ 91 (+355%)
Mutual labels:  nginx, nginx-proxy
Nginx
NGINX Accelerated! This is a Docker image that creates a high performance (FAST!), optimized image for NGINX for use with Redis and PHP-FMP. Deliver sites and applications with performance, reliability, security, and scale. This NGINX server offers advanced performance, web and mobile acceleration, security controls, application monitoring, and management.
Stars: ✭ 157 (+685%)
Mutual labels:  nginx, nginx-proxy
Vouch Proxy
an SSO and OAuth / OIDC login solution for Nginx using the auth_request module
Stars: ✭ 1,239 (+6095%)
Mutual labels:  nginx, nginx-proxy
Ip2geo
Импортер ipgeo-данных в файлы, понятные для nginx geoip module, с поддержкой кодов регионов РФ.
Stars: ✭ 59 (+195%)
Mutual labels:  nginx, nginx-proxy
Nginx Proxy Manager
Docker container for managing Nginx proxy hosts with a simple, powerful interface
Stars: ✭ 5,221 (+26005%)
Mutual labels:  nginx, nginx-proxy
Nginx Admins Handbook
How to improve NGINX performance, security, and other important things.
Stars: ✭ 12,463 (+62215%)
Mutual labels:  nginx, nginx-proxy
Symfony 4 Docker Env
Docker Environment for Symfony. PHP-FPM, NGINX SSL Proxy, MySQL, LEMP
Stars: ✭ 119 (+495%)
Mutual labels:  nginx, nginx-proxy
Plex Nginx Reverseproxy
Configuration to serve Plex Media Center https://plex.tv using Nginx https://nginx.com
Stars: ✭ 523 (+2515%)
Mutual labels:  nginx, nginx-proxy
Docker Waf
An NGINX and ModSecurity based Web Application Firewall for Docker
Stars: ✭ 181 (+805%)
Mutual labels:  nginx, nginx-proxy
Nginx Proxy Automation
Automated docker nginx proxy integrated with letsencrypt.
Stars: ✭ 2,302 (+11410%)
Mutual labels:  nginx, nginx-proxy
Apioak
Full Lifecycle Management API Gateway.
Stars: ✭ 335 (+1575%)
Mutual labels:  nginx, nginx-proxy
Engintron
Engintron for cPanel/WHM is the easiest way to integrate Nginx on your cPanel/WHM server. Engintron will improve the performance & web serving capacity of your server, while reducing CPU/RAM load at the same time, by installing & configuring the popular Nginx webserver to act as a reverse caching proxy in front of Apache.
Stars: ✭ 587 (+2835%)
Mutual labels:  nginx, nginx-proxy
Amazon Scripts
Administrative scripts for my EC2 Amazon Linux based Meteor/Mongo/Nginx/Node/Passenger server
Stars: ✭ 6 (-70%)
Mutual labels:  nginx
Ansible Role Htpasswd
Ansible Role - htpasswd
Stars: ✭ 17 (-15%)
Mutual labels:  nginx
Dockerfiles
Dockerfiles I create that may or may not be useful.
Stars: ✭ 5 (-75%)
Mutual labels:  nginx
Docker Nginx Php5 Laravel5
A Dockerfile which produces a docker image that runs Ubuntu 14.04, Nginx, PHP5 for Laravel 5.
Stars: ✭ 5 (-75%)
Mutual labels:  nginx
Zbx nginx
Zabbix monitoring template for nginx
Stars: ✭ 22 (+10%)
Mutual labels:  nginx
Swizzin
A simple, modular seedbox solution
Stars: ✭ 888 (+4340%)
Mutual labels:  nginx
Netboot Httpd
Docker container for serving netboot image over http. Use in combination with BSDPy
Stars: ✭ 5 (-75%)
Mutual labels:  nginx
K8s Elk Demo
A simple demonstration of the ELK stack on a Kubernetes cluster
Stars: ✭ 5 (-75%)
Mutual labels:  nginx

Nginx L7 DDoS Protection! 💥 ⚡️

(Please Read Whole Page, All Things Are Important Then If You Want You Can Use IT.)

This is it!

There will be no other version of this PR, This is the only and one and the best that you can find for free where you can see/do/change anything on your will and not some encrypted piece of code! This is pure open source code as you can open any file and read anything, This script automatically compiles nginx from source with lots of modules helpful but mostly who play a big role in L7 Anti-DDoS, including the L7 nginx module which you can configure as simple as https://github.com/theraw/The-World-Is-Yours/issues/10#issuecomment-442579528 more then that consider a Donate and you can contact me for further support!

Summer is here, after that i may be working and i don't see having much of free time to play with nginx!

To-Do

  • [x] Nginx Version, Always Latest.
  • [x] Support Ubuntu Trusty. (14.04)
  • [x] Support Ubuntu Xenial. (16.04)
  • [x] Support Ubuntu Cosmic. (18.10)
  • [x] Support Arch Linux.
  • [x] ModSecurity Support.
  • [x] Naxsi Support.
  • [x] L7 Protection.
  • [x] AutoBan System.
  • [x] Integrate Fail2Ban > IpTables.

Installation

  1. apt-get install build-essential libssl-dev curl nano wget zip unzip sudo git psmisc -y

  2. git clone https://github.com/theraw/The-World-Is-Yours.git

  3. cd The-World-Is-Yours/; chmod +x *

  4. ./install

Informations.

What if installation script fails? - Check what was the problem source fix it (mostly should be for missing packages) then remove everything under /opt/ folder and just execute again ./install

=> /nginx/                                = Nginx Path,
=> /nginx/live/                           = Vhosts Config Files Dir,
=> /nginx/logs/                           = Core Logs Files,
=> /nginx/modsecurity/                    = ModSecurity Rules Dir,
=> /hostdata/                             = Place to store your domain folders.
=> /hostdata/yourdomain.com/              = Ex of domain dir (private folder),
=> /hostdata/yourdomain.com/public_html/  = Ex of your domain webroot (public files only),
=> /hostdata/yourdomain.com/logs/         = Place where to store your Domains logs (access.log) (private folder),
=> /hostdata/yourdomain.com/ssl/          = Place where to store domain ssl/key (private folder),
=> /hostdata/yourdomain.com/cache/        = Place where to store site cache (private folder).

// Private Folder - Means this cannot be accessed by public.
// Public Folder  - Means files into this folder can be accessed by public.

Check.

1 . L7 (Cookie Based Protection) AND Replace "proxy2.dope.. links with yours click here to find aes which should be stored on a external link or in a place where L7 is disabled because it will not work if you put it in main site dir!.

2 . Auto Ban System based on Connection for ip

3 . Auto Ban 444 Reqs A day i've been under attack of multiple proxies, and even after they got banned they still was keep trying the same thing so when you ban someone when that ip tries to access your website that request will not go on error.log but in access.log so i created this rule to ban with iptables every request who have stauts 444 so nginx will not have to handle those.

4 . Kernel Settings

5 . Naxsi Rules Included

6 . Example of Naxsi

7 . Check Iptables rules It will not be automatically enabled, because this changes based on providers in ovh it work in azure it doesn't work. so you need to manually activate iptables!

8 . ModSecurity is not loaded. However you need to set it up by yourself. you have a folder /nginx/modsecurity/ which ModSecurity rules are stored, open /nginx/modsecurity/modsecurity.conf add those

Include crs-setup.conf
Include rules/*.conf

ModSecurity is by default enabled as "detect only" you can turn it on always by doing this

SecRuleEngine On

Using modSecurity for your site

server { 
     ..... 
        modsecurity on;
        modsecurity_rules_file /nginx/modsecurity/modsecurity.conf; 
        location / { 
     ..... 
        } 
}

Careful Using modsec rules like

   location / { 
       modsecurity_rules_file /nginx/modsecurity/modsecurity.conf; 
   } 

it means that's enabled just for your main place / not for other dirs in your site ex /admin/ (:

Test it! curl 'http://localhost/?q="><script>wanna hack</script>'

<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx</center>
</body>
</html>

Keep In Mind.

The L7 Protection is the same way which cloudflare have that banner "Under Attack" A.K.A Cookie based authorization. Most of bots from where attacks will come doesn't support cookies so it will fail to access your site. (Test it by yourself to "curl http://yoursite.com" before you activate L7 and after you start L7 so you will understand better.)

The L7 protection is a good thing for your protection. But a very bad thing for your website seo!, As facebook/google/bing and all search engines will not be able to access your website anymore. There is a way to allow them but if you have 1 year free time to find all their ips go and try it. I've been thinking for a "reverse dns" whitelist but haven't done it so as of now it is like this.

Contributors

Feel free to pull request or do a suggestion..

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].