I have a Apache web server set which listens on port 4000 and I want to use this (local) server as a kind of proxy.
The idea is to redirect all the local outcomming HTTP traffic (port 80) to my server at 127.0.0.1:4000. Of course, the server must be able to send request on port 80.
I tried to update iptables like this :
iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination 127.0.0.1:4000
Obviously it does not work because the traffic from my server is also redirected to itself.
The question is: how can I only authorize HTTP request from my server?
Aucun commentaire:
Enregistrer un commentaire