Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/VirtuBox/nginx-cloudflare-real-ip
Bash script to restore visitor real IP under Cloudflare with Nginx
https://github.com/VirtuBox/nginx-cloudflare-real-ip
bash-script cloudflare http-realip nginx ufw-firewall
Last synced: 4 days ago
JSON representation
Bash script to restore visitor real IP under Cloudflare with Nginx
- Host: GitHub
- URL: https://github.com/VirtuBox/nginx-cloudflare-real-ip
- Owner: VirtuBox
- License: mit
- Created: 2018-09-11T21:05:11.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-29T07:03:15.000Z (over 5 years ago)
- Last Synced: 2024-10-19T07:53:26.735Z (16 days ago)
- Topics: bash-script, cloudflare, http-realip, nginx, ufw-firewall
- Language: Shell
- Homepage: https://virtubox.github.io/nginx-cloudflare-real-ip/
- Size: 7.81 KB
- Stars: 13
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nginx-cloudflare-real-ip
Configure Nginx to restore Visitors real IP under Cloudflare CDN
## Features
* Get Cloudflare IPv4 + IPv6 list and create nginx configuration to restore visitors real IP in `/etc/nginx/conf.d/cloudflare.conf`
* Whitelist Cloudflare IPs on port 80 & 443 with UFW (optional)## Requirements
* Nginx built with http_realip_module
You can check if http_realip_module available with :
```bash
nginx -V 2>&1 | grep with-http_realip_module
```If the previous command return nothing, http_realip_module isn't available
---
## Usage
Nginx configuration only
```bash
bash <(wget -O - vtb.cx/nginx-cloudflare || curl -sL vtb.cx/nginx-cloudflare)
```Nginx configuration + UFW configuration
```bash
bash <(wget -O - vtb.cx/nginx-cloudflare || curl -sL vtb.cx/nginx-cloudflare) --ufw
```Published & maintained by [VirtuBox](https://virtubox.net)