mirror of
https://github.com/ergin/nginx-cloudflare-real-ip.git
synced 2026-04-25 13:25:57 +03:00
[GH-ISSUE #2] Blocking connections not from cloudflare #2
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-cloudflare-real-ip#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aseques on GitHub (Apr 5, 2019).
Original GitHub issue: https://github.com/ergin/nginx-cloudflare-real-ip/issues/2
This system works fine to add the source ip to the apache logs, the problem is that after this you can't block the traffic not comming from cloudflare because it's identified with the real ip. Have you accomplished this?
@Nottt commented on GitHub (May 27, 2019):
What do you mean block the traffic not coming from cloudflare?
Have you tried running:
This would allow only cloudflare IP's to connect to port 80 and 443, assuming you are running your website in those ports of course.
If you delete the firewall rules allowing port 80 and 443, then your server would not respond to anyone in those ports if not coming from cloudflare IP's.
@aseques commented on GitHub (May 27, 2019):
I prefer not to rely on the firewall to block the connections, I already have another firewall, and yet another layer to mantain makes things difficult.
I found another solution at stackoverflow that allows both, I'll paste into another issue