Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

thanks

share|improve this question

3 Answers 3

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

 
discard

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.