How to run multiple Tor processes at once with different exit IPs?

Create four torrc files, say /etc/tor/torrc.1 to .4. In each file, edit the lines: SocksPort 9050 ControlPort 9051 DataDirectory /var/lib/tor to use different resources for each torrc file, e.g. for for torrc.1: SocksPort 9060 ControlPort 9061 DataDirectory /var/lib/tor1 for torrc.2, SocksPort 9062 ControlPort 9063 DataDirectory /var/lib/tor2 and so on. A configuration file containing only the … Read more

How can I use a SOCKS 4/5 proxy with urllib2?

You can use SocksiPy module. Simply copy the file “socks.py” to your Python’s lib/site-packages directory, and you’re ready to go. You must use socks before urllib2. (Try it pip install PySocks ) For example: import socks import socket socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, “127.0.0.1”, 8080) socket.socket = socks.socksocket import urllib2 print urllib2.urlopen(‘http://www.google.com’).read() You can also try pycurl lib and … Read more

How can I setup a SOCKS proxy over ssh with password based authentication on CentOS?

Dynamic application-level port forwarding (ssh -D) doesn’t support this feature. Take a look at the Dante for instead: [I] net-proxy/dante Available versions: 1.1.19-r4 (~)1.2.3 (~)1.3.0 (~)1.3.1 (~)1.3.1-r1 (~)1.3.2 {debug kerberos pam selinux static-libs tcpd} Installed versions: 1.3.2(04:14:03 PM 11/08/2011)(pam static-libs tcpd -debug -kerberos -selinux) Homepage: http://www.inet.no/dante/ Description: A free socks4,5 and msproxy implementation But note … Read more

Using a socks proxy with git for the http transport

I tested with Git 1.8.2 and SOCKS v5 proxy, following setting works for me: git config –global http.proxy ‘socks5://127.0.0.1:7070’ UPDATE 2017-3-31: According to the document, despite the name http.proxy, it should work for both HTTP and HTTPS repository urls. Thanks @user for pointing out this. UPDATE 2018-11-27: To disable the proxy, run command: git config … Read more

How to enable SOCKS5 for Squid proxy?

Have a look at this page. It talks about squid socks support and how you can build it to support SOCKS connections. The status is “testing”. So, you may need to think about using it for production. When building squid, you need to define these variables: export CFLAGS=” -Dbind=SOCKSbind ” export CXXFLAGS=” -Dbind=SOCKSbind ” export … Read more

Can I disable interactive shell access while tunneling web traffic through SSH?

After four years this answer deserved an update. While originally I used authorized_keys myself and would probably use it still in some select cases, you can also use the central sshd_config server configuration file. sshd_config You can designate (for your particular use case) a group, such as proxy-only or Match individual users. In sshd_config. This … Read more

Remote Desktop over SSH SOCKS proxy to bypass firewall [closed]

You don’t need a SOCKS proxy for this; simple SSH port forwarding will work. For example, there’s a server at my office I frequently need to access, which we’ll call server.example.com. I can’t connect to it directly, but I can ssh to myofficemachine.example.com. So I do this: ssh -L 3389:server.example.com:3389 myofficemachine.example.com And then I point … Read more