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
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityBy 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.
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
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.