[GH-ISSUE #2482] IP Limit does not see the ip address #1711

Closed
opened 2026-10-31 20:20:36 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @egasvegas1109 on GitHub (Aug 11, 2024).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2482

Hello, I use gRPC transport and proxy traffic through cloudflare. Fali2ban and IP Limit don't see the client's ip address, so it doesn't work. Please tell me what can be done in this case?

Here is the nginx setup

	location /myLocation {
		if ($content_type !~ "application/grpc") {
			return 404;
		}

		client_max_body_size 0;
		client_body_buffer_size 512k;
		grpc_set_header X-Real-IP $remote_addr;
		client_body_timeout 52w;
		grpc_read_timeout 52w;
		grpc_pass grpc://127.0.0.1:1823;
	}
Originally created by @egasvegas1109 on GitHub (Aug 11, 2024). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2482 Hello, I use gRPC transport and proxy traffic through cloudflare. Fali2ban and IP Limit don't see the client's ip address, so it doesn't work. Please tell me what can be done in this case? Here is the nginx setup ``` location /myLocation { if ($content_type !~ "application/grpc") { return 404; } client_max_body_size 0; client_body_buffer_size 512k; grpc_set_header X-Real-IP $remote_addr; client_body_timeout 52w; grpc_read_timeout 52w; grpc_pass grpc://127.0.0.1:1823; } ```
bsakaguchi 2026-10-31 20:20:36 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@MHSanaei commented on GitHub (Aug 11, 2024):

Of course, it won't see the client IP address with this Nginx config.
You need to use set_real_ip_from on your Nginx config with all your CDN IP addresses, then you can see your clients' IP addresses.
If you don't know how to do it so don't use it. 🤷

<!-- gh-comment-id:2282842208 --> @MHSanaei commented on GitHub (Aug 11, 2024): Of course, it won't see the client IP address with this Nginx config. You need to use `set_real_ip_from` on your Nginx config with all your CDN IP addresses, then you can see your clients' IP addresses. If you don't know how to do it so don't use it. 🤷
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#1711
No description provided.