nginx plugin

Started by fabian, June 10, 2018, 12:35:30 PM

Previous topic - Next topic


Hi guys, hi @Fabian,
I am looking for a way to block or unblock IP´s /IP-ranges in the location block.

like
location / {
  # block one workstation
  deny    192.168.1.1;
  # allow anyone in 192.168.1.0/24
  allow   192.168.1.0/24;
  # drop rest of the world
  deny    all;
}


Is it already possible or is there another solution?

Best regards,
Andreas

There is already a pull request open waiting for approval. This is for 1.4. How long you have to wait for the feature depends on how long my pull request is stuck in the review process and when it passes it, to the next OPNsense update.

@Fabian Great, thanks a lot. I have found it

https://github.com/opnsense/plugins/pull/930

Great work

regards
Andreas



how to delete all banned ip's by nginx?

You can go to the banned page via the menu and unlock it again. Please note that it will unlock immediately and block again on the next violation. A button to delete all does not exist. You can script it if you want since it is fully API capable.

Is there any problem behind?

yep (

it is hard to write this script... and i want to ban this "banning" system... just to turn it off

That's easy: Just don't use the firewall alias as it does not hook into the firewall automatically.

ok, how to remove blocking rules?

i don't want to use it.

If you mean the function in the plugin which blocks the request, there is a advanced checkbox "Disable Bot Protection"

Should it be possible to add websocket support ?

The plugin is really cool, but a lot of application are using WebSocket.
Or could it be possible to add our own configuration ?
Soekris net6501-70, APU 2C4, Soekris net5501-70, ...

It's already there for a long time. It is a checkbox but I don't remember if I added it in the upstream or the location block.