0

On my Mac OS X (10.6.8) I'd like to make all requests for 111.111.111.111 go to 222.222.222.222 for all ports. To test this, I have a webserver at 222.222.222.222:80 which will respond with a page for any host. e.g:

I've tried doing the following:

sudo ifconfig lo0 222.222.222.222 alias
sudo ipfw add fwd 111.111.111.111 tcp from me to 222.222.222.222

But trying to access http://111.111.111.111/ doesn't give me anything. I think this is related to the fact that although the redirect is there, the tcp packet's destination IP is not rewritten.

Where should I look next to solve this? Should I also look into using natd?

cherouvim
  • 744
  • 3
  • 18
  • 37

1 Answers1

0

OSX 10.6.8 uses Apache web server. The config files are usually found in /etc/apache2/

You may want to try mod_proxy

Covering all ports is another matter. I think it requires some network/port address translation, about which I know little

Paul E
  • 1
  • 1