-1

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!

1 Answer 1

0

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.

Not the answer you're looking for? Browse other questions tagged .