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

nginx not starting when NAXSI=YES - may be NAXSI WAF ACCEPT error ? #1725

Closed
EdNett opened this issue May 30, 2023 · 7 comments
Closed

nginx not starting when NAXSI=YES - may be NAXSI WAF ACCEPT error ? #1725

EdNett opened this issue May 30, 2023 · 7 comments

Comments

@EdNett
Copy link

EdNett commented May 30, 2023

root@server1:# service nginx status
/etc/init.d/nginx: You don't have permissions to execute nginx.
root@server1:
#

NginX won't start and it gives me this bizare error; Why? and What to do?

boa info more here: https://gist.github.com/EdNett/e862f0760cf3ec37bcae6a767051050f

Best,

Ed

@EdNett
Copy link
Author

EdNett commented May 31, 2023

I'm just going to reinstall the entire server - this thing has never woked properly!

@EdNett EdNett closed this as completed May 31, 2023
@EdNett EdNett reopened this May 31, 2023
@EdNett
Copy link
Author

EdNett commented May 31, 2023

This error arises when I set:

_NGINX_NAXSI=YES

in the barracuda.cnf file

I am checking if a full ngx reinstall with those set to NO will allow Nginx to be restarted. It does, so it must be NAXSI - Is libpcre installed? NAXSI depends on it. Here is libpcre:

root@server1:# whereis libpcre
libpcre: /usr/lib/x86_64-linux-gnu/libpcre32.a /usr/lib/x86_64-linux-gnu/libpcre.so /usr/lib/x86_64-linux-gnu/libpcre16.so /usr/lib/x86_64-linux-gnu/libpcre32.so /usr/lib/x86_64-linux-gnu/libpcre16.a /usr/lib/x86_64-linux-gnu/libpcre.a
root@server1:
#

@EdNett EdNett changed the title nginx not starting nginx not starting when HEADERS=YES and NAXSI=YES - must be NAXSI WAF permissions error ? May 31, 2023
@EdNett EdNett changed the title nginx not starting when HEADERS=YES and NAXSI=YES - must be NAXSI WAF permissions error ? nginx not starting when NAXSI=YES - may be NAXSI WAF ALLOW error ? May 31, 2023
@EdNett
Copy link
Author

EdNett commented May 31, 2023

By the way, NAXSI is a very nice feature - rather than experimental - I think we should be using it by default - unless it slows down the web server or uses resources too much - but I don't think that it does. This feature has always worked until now.

@omega8cc
Copy link
Owner

_NGINX_NAXSI was not tested for years, please avoid in production any feature not enabled by default.

@omega8cc
Copy link
Owner

By the way, perhaps /etc/init.d/nginx is not executable so you can't use it.

Please check ll /etc/init.d/nginx

@EdNett
Copy link
Author

EdNett commented Jun 1, 2023

Hello, No there is nothing wrong with the permissions of that file. I checked that first thing of course.

Naxsi behaves like a DROP-by-default firewall, the only task is to add required ACCEPT rules for the target website to work properly. Are the ACCEPT rules being added?

@EdNett EdNett changed the title nginx not starting when NAXSI=YES - may be NAXSI WAF ALLOW error ? nginx not starting when NAXSI=YES - may be NAXSI WAF ACCEPT error ? Jun 1, 2023
@omega8cc
Copy link
Owner

omega8cc commented Jun 1, 2023

This experimental feature is not supported currently. We may review it at some point in the future, though.

Sent with GitHawk

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

No branches or pull requests

2 participants