Friday, November 22, 2013

IP Forwarding/NAT Translation for MAC OS

Ever need to make IP A think its talking to IP B?

Here is how to set it up for Mac's

First you create a local loopback interface:
sudo ifconfig lo0 <IP A> alias

Then you add the following rule:
sudo ipfw add fwd <source IP>,80 tcp from me to <IP B> dst-port 80

Change the ports/protocols as needed.

No comments:

Post a Comment