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

I am looking to add a tailing rule to IPTABLES that would redirect any traffic on port 80 that didn't match the rules to a specific url on a separate IP. Thanks!

share|improve this question

closed as not a real question by Michael Hampton, mdpc, Ward, Khaled, Sven Feb 11 '13 at 8:53

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

iptables is not the tool for this job; REDIRECT and DNAT only work at a Layer 3/4 (TCP/IP), not a HTTP redirect, so it can not alter the URL request at the HTTP protocol level.

You will need to either add the redirects to each HTTP server to issue the HTTP redirect, or change the box that is doing the iptables DNAT's to be a Reverse Proxy instead.

share|improve this answer

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