Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For starters, this is not a web server. I would like to allow or deny HTTP methods on various ports on the server itself.

Ideally could write rules like UFW only extended to include the HTTP method


ufw allow 80 -method GET -deny POST,PUT,DELETE

Is there any lightweight solution to this?

Thank you. The servers typically run products such as elasticsearch, redis, etc. and It would be great to only allow those operations from certain IP's on their various ports.

share|improve this question

The default Linux netfilter firewall is a packet filter, so that's not going to help you much.

What you're looking for is what's typically called a layer 7 firewall, an application firewall that understands the HTTP protocol.

Alternatively look at an IPS. I think you can for instance configure SNORT to run inline, doing real time packet inspection.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.