Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I want to block all CONNECT HTTP requests to my linux server. I run Ubuntu 10.04 server edition. I am a new bee to server setups/deployment, please help.


share|improve this question
up vote 1 down vote accepted

By default a web server which does not have proxying enabled, is not going to serve them anyway.

You can't "block requests", only have the server refuse to serve them.

If you run a server on the public internet, from time to time people will send strange requests to it, this is either faulty (possible) or malicious (more likely) software trying to do something it can't. You can't stop it, just live with it.

share|improve this answer

If you web server don,t support limit, try use iptables:

iptables -A INPUT -p tcp -m multiport --dport 80,443,3128 -m string --string "CONNECT" --algo kmp --to 100 -j DROP
share|improve this answer

On Apache and every other web server that I'm familiar with, all such requests are disabled by default. If you're seeing a bunch of CONNECT requests in your server logs, don't worry: they're harmless and just return an error response to the client.

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.