Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ip blacklist not working #45

Open
rosolinol opened this issue May 16, 2020 · 3 comments
Open

ip blacklist not working #45

rosolinol opened this issue May 16, 2020 · 3 comments

Comments

@rosolinol
Copy link

tried to ban myself as

local ip_blacklist = {
"xx.99.0.0/18",
}

logs

2020/05/16 17:37:03 [warn] 1244#1244: *11 [lua] _G write guard:12: __newindex(): writing a global lua variable ('shuffle') which may lead to race conditions between concurrent requests, so prefer the use of 'local' variables
stack traceback:
        /etc/nginx/anti_ddos_challenge.lua:2454: in main chunk, client: xx.99.118.30, server: example.com, request: "GET /index.php HTTP/2.0", host: "example.com"

the same things stands for ip_whitelist doesn't work also some other user reported #44

also i have another question can you provide a more friendly log output or allowing user to somewhat log "functions" or create custom log formats something similar to nginx ?

log_format raw 'FROM: $remote_addr  | STATUS: $status | TO: $request | CACHE: $upstream_cache_status';

?!

Thank you.

@Sylvvvia
Copy link

Simply restart your webserver. It needs to reload script.

@rosolinol
Copy link
Author

@Sylvvvia please stop telling ppl to restart nginx it makes no sense at all. ppl who had the knowledge to install lua and this module they also know that restart is required after changes.

In my case was wrong ipv4 passed to nginx since it was behind NAT. After this fix it has been working well so far.

Still requesting help for custom logs so i'm not closing this without e reply from dev.

@glushchenko
Copy link

Fix here bis-gmbh@80f23fd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants