0

I'm looking to forward traffic coming in on port 21000 to get redirected to 80 and then flow back through the proxy (80 back to 21000). How do you configure this?

1 Answer 1

1

Wouldn't a better way to handle this be through IPTables?

iptables -A PREROUTING -t nat -i eth0 -p tcp -d {some host} --dport 21000 -j REDIRECT --to-port 80

8
  • How do I try this out. And then undo this if it doesn't work? Thanks.
    – Tyndall
    Feb 24, 2012 at 21:22
  • How does iptables help me forward traffic from browsers hitting this machine? iptables is only for outbound traffic from this box correct? It wouldn't provide me with the proxy functionality correct?
    – Tyndall
    Feb 24, 2012 at 21:23
  • What exactly are you trying to do? It appears that you are wanting to have the user go to port 21000 through your machine, and then on the other side actually hit port 80. Is there a particular reason you wish to mask the port? Are you wanting to proxy, or do you want to just route?
    – gdurham
    Feb 24, 2012 at 22:09
  • It is for a customer that needs to hit our service on port 80. They get charged for traffic on port 80 but not other ports. I'm just trying to pass http traffic through a machine ("proxy") to our server on the other side and back. So given this would iptables work? Our server in the middle would be hosted on EC2.
    – Tyndall
    Feb 25, 2012 at 3:53
  • You could do with adding this to your question. Three different machines in three different locations will make a big difference to the answers.
    – Ladadadada
    Feb 25, 2012 at 7:43

You must log in to answer this question.

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