pf NAT用于本地发起的流量

时间:2014-10-22 22:25:12

标签: macos nat osx-yosemite

我正在尝试代理来自我的计算机的22个流量,因此它将被代理/转发到远程服务器。使用ipfw非常容易,但Yosemite只有pf ....

有没有人发现如何在OSX Yosemite的本地(源自机器)流量上运行rdr?

这不起作用!

# Custom pf Rules
#######################################
# target_ip is the ip of which I would like traffic to be proxied  
target_ip = "10.0.0.2” 
# porxy_ip is the proxy address 
porxy_ip = "192.168.1.100”


rdr pass log on lo0 proto tcp from en0 to $target_ip port 80 -> $porxy_ip port 8080

pass out on en0 route-to lo0 inet proto tcp from en0 to $target_ip port 80 keep state

# End

任何建议?

0 个答案:

没有答案