redsocks
redsocks copied to clipboard
pf firewall setting on MacOs X
Hi,
I'm trying to set up redsocks on my mac machine. I got it running, but I'm not sure how to configure pf to redirect traffic to it. With iptables I can do:
iptables -t nat -A REDSOCKS -p tcp -j REDIRECT --to-ports 12345
But with pf I'm not sure. This is one configuration I found:
match out on en0 from any to 10.0.0.0/8 nat-to 127.0.0.1
I only want to route traffic for 10.0.0.0/8 through redsocks. I never found an option to specify the port .
And I'm also interested in learning more how redsocks works internally? If all traffic goes to one port how can it know where to forward the connection? Does the request to 127.0.0.1:12345 still contain the original headers?
I never solved this problem, but if somebody finds this googling take also a look here: http://serverfault.com/questions/709369/pf-mac-os-x-rule-to-redirect-all-traffic-to-a-specific-ip-port/746983#=
Maybe this additional information will be useful to you.
how to config redirector for pf??
I have no permanent root access to machines running MacOSX to test and develop for this platform. If was v0.4 ever working on MacOSX, please, contribute documentation with working MacOSX firewall configuration guidelines.