Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pf firewall setting on MacOs X #63

Open
bkolobara opened this issue Jul 25, 2015 · 3 comments
Open

pf firewall setting on MacOs X #63

bkolobara opened this issue Jul 25, 2015 · 3 comments

Comments

@bkolobara
Copy link

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?

@bkolobara
Copy link
Author

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.

@bkolobara bkolobara changed the title pf firewall setting on MaxOs X pf firewall setting on MacOs X Jan 6, 2016
@tony1016
Copy link

how to config redirector for pf??

@darkk
Copy link
Owner

darkk commented Feb 1, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants