naxsi | high performance , low rules maintenance WAF | Firewall library
kandi X-RAY | naxsi Summary
kandi X-RAY | naxsi Summary
NAXSI means Nginx Anti XSS & SQL Injection. Technically, it is a third party nginx module, available as a package for many UNIX-like platforms. This module, by default, reads a small subset of simple (and readable) rules containing 99% of known patterns involved in website vulnerabilities. For example, <, | or drop are not supposed to be part of a URI. Being very simple, those patterns may match legitimate queries, it is the Naxsi's administrator duty to add specific rules that will whitelist legitimate behaviours. The administrator can either add whitelists manually by analyzing nginx's error log, or (recommended) start the project with an intensive auto-learning phase that will automatically generate whitelisting rules regarding a website's behaviour. In short, Naxsi behaves like a DROP-by-default firewall, the only task is to add required ACCEPT rules for the target website to work properly.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of naxsi
naxsi Key Features
naxsi Examples and Code Snippets
Community Discussions
Trending Discussions on naxsi
QUESTION
I have deployed my Laravel app to the following url proclubs.app - this is a domain from Google domains that requires an SSL certificate (the SSL has been setup using Certbot).
I have setup the Laravel Breeze package for authentication (e.g register/login functionality) and this all works fine when testing locally, now I have pushed this to a remote URL none of the routes don't work, and I just get a 404 Not Found
message. I have ran the php artisan route:list
and can see all the expected routes are there. I am 99% certain I have made a mistake with the nginx server block - I have used the default one that digitalocean provide in etc/nginx/sites-available
and edited it accordingly, but not sure what is incorrect for me to get these 404 errors, can anyone suggest what I have done wrong?
ANSWER
Answered 2021-Oct-02 at 20:26If you get 404, probably requested path wrong. I checked your nginx configurations and I see you have 2 servers, for http (first server) and https (second server) requests.
When you enter the url /login path it means that you want to go login folder. But in laravel it is special request.
So your mistake is in the second server (https) your request find a folder, not a special request. You must change your location option with the first server location option.
QUESTION
I have a domain sub.example.com
that is configured and fully functioning on an Ubuntu server. I used Certbot to configure the domain with HTTPS, however I also have APIs configured to be accessed on a specific port of that domain, say 2500. When I access example.com
, I see the lock that says the site is secure, however whenever I go to example.com:2500/api/someAPI
, the API returns the appropriate result, but without the site being secure. Because the main site is secure, while the API access location isn't, I am unable to make API calls accordingly, resulting in net::ERR_SSL_PROTOCOL_ERROR
.
Stack:
- VPS: Amazon EC2
- SSL Cert Provider: Let's Encrypt (through Certbot)
- Server: Node.js (Express)
- WebApp: React
- Web Server: nginx
I was able to get it working using the same exact technologies on another VPS (DigitalOcean) and domain some time ago, but I don't believe I ever ran into this issue.
nginx.conf:
...ANSWER
Answered 2020-Feb-28 at 22:44By default, no other port than port 443 uses the secure connection. However, if you specify to do so (such as using https://example.com:2500) it should connect securely. If you want it to do this automatically, you need to configure it in the web server application settings. If you know what application is used to host the server (ex. apache) and if you have access to edit the configuration files, you should be able to configure this.
Edit: Sorry, I did not originally see you tagged the question as using nginx. I have not done this specifically before using nginx, but I found this tutorial that explains the process. Inside of /etc/nginx/sites-available/example.com, you should be able to change "listen 443 ssl;" to "listen 443, 2500 ssl;" in order to listen on multiple ports. In addition, you would also add return 301 https://$host$request_uri;
in order to redirect connections to an https secure connection (see https://serversforhackers.com/c/redirect-http-to-https-nginx).
I hope this helps!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install naxsi
Some rules for mainstream software
The nxapi/nxtool to generate rules
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page