redirect with ipfw to an external server

Discussion in 'Mac OS X Server, Xserve, and Networking' started by Bob2001, Apr 27, 2013.

  1. macrumors newbie

    Joined:
    Apr 27, 2013
    #1
    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?
     
  2. macrumors 6502

    HenryAZ

    Joined:
    Jan 9, 2010
    Location:
    South Congress AZ
    #2
    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?
     

Share This Page