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!
closed as not a real question by Michael Hampton♦, mdpc, Ward, Khaled, SvW Feb 11 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.
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.