PDA

View Full Version : redirect with ipfw to an external server




Bob2001
Apr 27, 2013, 03:15 AM
HI everybody,

I like to install an redirect from 127.0.0.1:8080 to server_xy:80 on my mac

this works (I can see the site of my webserver on the mac):
sudo ipfw add 100 fwd 127.0.0.1,80 tcp from any to any 8080

but this doesn't works (redirect to google.de -> timeout):
sudo ipfw add 100 fwd 173.194.69.94,80 tcp from any to any 8080

Could you help me, please?



HenryAZ
Apr 27, 2013, 10:01 AM
I am no expert with ipfw, but it appears (from a quick read of the man page) that you will be unable to accomplish this with a fwd action to an external address.

You mentioned you have Apache running on the local machine. Why not set up Apache to answer to 127.0.0.1:8080 and redirect from there?