rofl0r / proxychains-ng

proxychains ng (new generation) - a preloader which hooks calls to sockets in dynamically linked programs and redirects it through one or more socks/http proxies. continuation of the unmaintained proxychains project. the sf.net page is currently not updated, use releases from github release page instead.
http://sourceforge.net/projects/proxychains-ng/files
GNU General Public License v2.0
9.82k stars 1.08k forks source link

proxychains4+jupyter notebook #499

Closed qaiwiz closed 1 year ago

qaiwiz commented 1 year ago

I am using python 3.7 and 3.9 on macOS (monterey), and I am trying to send my notebook traffic through socks5, when I try $proxychains4 jupyter notebook and then make some web requests (eg, curl ifconfig.io) I get unlimited error: [proxychains] Strict chain ... 127.0.0.1:8080 ... 127.0.0.1:61798 <--socket error or timeout!

I believe this has something to do with my pf.conf to allow "any lo to lo" connection, I tried to change this in pf.conf: pass in quick on lo0 all pass out quick on lo0 all

But it doesn't work, perhaps since it returns this error (apparently no ALTQ is automatically supported in macos) No ALTQ support in kernel ALTQ related functions disabled pfctl: pf not enabled

Any idea how to resolve this?

rofl0r commented 1 year ago

try enabling/disabling localnet directive for 127.x.x.x net

qaiwiz commented 1 year ago

I added: set skip on lo0 to /etc/pf.conf and then ran sudo pfctl -f /etc/pf.conf, however, I am not sure any rule is updated as it always complain about ALTQ. when I look at sudo pfctl -sr, I get No ALTQ support in kernel ALTQ related functions disabled scrub-anchor "com.apple/" all fragment reassemble anchor "com.apple/" all

I see no set skip ... in the rule list. However, when I add other rules like "pass in quick on lo0 all" it will appear here in the output.

rofl0r commented 1 year ago

i don't talk about your firewall, but about proxychains.conf

qaiwiz commented 1 year ago

Thanks. Yes, that was the problem. I am sorry it was already written in the config file, but I somehow missed it. Just to clarify for others, I have uncommented the following lines:

if you enable this, you have to make sure remote_dns_subnet is not 127

you'll need to enable it if you want to use an application that

connects to localhost.

localnet 127.0.0.0/255.0.0.0 localnet ::1/128