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 am looking for a way to make iptables only accept requests for my domain name and reject the others.

Lately I misconfigured my apache proxy, it is now fixed, but I keep receiving a load of requests looking like that :

xxxx.xx:80 - - [12/Sep/2012:15:25:14 +0200] "GET${PUB_URL} HTTP/1.0" 200 4985 "" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)"
xxxx.xx:80 - - [12/Sep/2012:15:25:14 +0200] "GET HTTP/1.0" 200 425 "-" "MobileRunner-J2ME"

which I would like to block.

How can I manage this ?

share|improve this question

migrated from Sep 13 '12 at 21:35

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

iptables (network-layer firewalling) is the wrong place to block these requests. It's very hard to make application-level filtering decisions at layer 3, and usually an unreliable hack at best even if you manage it. Look up "layering violation".

I see from the web server logs that those two requests are being answered with 200 status codes, which means they're being accepted and processed. You should configure your HTTP proxy server to refuse them. I see that you have already asked how to do that.

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.