Transparent proxy on Mac OS X Lion with Fusion

1.3k views Asked by At

I have a MacOS X (Lion) with VMWare Fusion installed. In Fusion I have two guests: a Linux and a MS Windows XP. The two guests networking is configured to use NAT thru vmnet8 interface. Both boxes access to the internet just fine by default.

My objective is to force all HTTP (tcp/80) traffic leaving the XP client to be redirected to the Linux client on the proxy port (tcp/8080). The XP client must not be aware of the redirection thus explicit proxy configuration in the XP browser is not an option.

I already tried this setup on a linux host running virtualbox. The iptables nat rules did the trick just fine. But I'm completely lost on how to do this in Mac which is pf based.

I've been attempting to configure a complementary pf.conf (proxy.conf) file with just one line:

rdr on vmnet8 proto tcp from 192.168.190.138 to any port 80 -> 192.168.190.134 port 8080

Concerning the IP: 192.168.190.138 is the XP guest ip and 192.168.190.134 is the linux guest.

I then run the following pfctl commands:

$sudo pfctl -vf ~/proxy.conf
No ALTQ support in kernel
ALTQ related functions disabled
rdr on vmnet8 inet proto tcp from 192.168.190.138 to any port = 80 -> 192.168.190.134 port 8080

and then:

$ sudo pfctl -e
No ALTQ support in kernel
ALTQ related functions disabled
pfctl: pf already enabled

When I attempt to open a webpage on the XP guest pf doesn't redirect the traffic to the linux box. For some reason the pf rule isn't working as expected. Probably because something is missing...

0

There are 0 answers