2

I'm trying to setup proxychains on Kali like this :

User > Tor > SOCKS5 > Out

I've created my SOCKS5 server with danted running on port 1080. I setup an SSH connection on my Kali distrib :

ssh -NfD 1080 user@address

And I'm able to connect to the SOCKS5 server without trouble. Same when I'm trying to connect to Tor network.

But when I try to connect to Tor AND to the SOCKS5 server, I get a denied error :

|S-chain|-<>-127.0.0.1:9050-<>-127.0.0.1:1080-<--denied

So I tried to allow connections from any IP address in dante, I'm not sure if it's right :

logoutput: /var/log/dante.log

internal: 127.0.0.1 port = 1080
external: venet0
method: username none
user.notprivileged: nobody

client pass {
  from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
  protocol: tcp udp
}
pass {
  from: 0.0.0.0/0 to: 0.0.0.0/0
  protocol: tcp udp
}

Any idea where it could come from ?

user196279
  • 71
  • 4
il0venoobs
  • 61
  • 1
  • 2
  • 7

1 Answers1

2

I found an answer to my question and for a visibility purpose I think responding is better than editing.

So I wanted to use Tor and a SOCKS5 proxy at the same time using proxychains. There are two ways to achieve that :

With dante server

Dante server is a SOCKS5 server (and client) with lots of options I don't know yet but will learn soon I hope.

So first you install dante-server :

wget https://www.inet.no/dante/files/dante-1.4.1.tar.gz
tar xvf dante-1.4.1.tar.gz
cd dante-1.4.1
./configure
make && make install

#This is my launch script you can use yours obviously
wget https://dl.dropboxusercontent.com/u/71868038/sockd
mv sockd /etc/init.d/sockd
chmod +x /etc/init.d/sockd
update-rc.d sockd defaults

wget https://dl.dropboxusercontent.com/u/71868038/sockd.conf
mv sockd.conf /etc/

You can edit your conf as you want, for example to block all the requests except from your IP address. More info here. Don't forget to change the IP address of your server in the config file !

Now that your SOCKS5 server is ready and works, you can use it along with tor thanks to proxychains. Just add your server in the config file :

strict_chain
proxy_dns
tcp_read_time_out 15000
tcp_connect_time_out 8000
socks4 127.0.0.1 9050
socks5 1.2.3.4 1080

Start tor and enjoy :

service tor start
proxychains iceweasel

With an SSH tunnel

Simpler solution.

You will need tor, torsocks and ssh

apt-get install torsocks
service tor start
torsocks ssh -NfD 1080 1.2.3.4
proxychains iceweasel

Configuration of proxychains :

strict_chain
proxy_dns
tcp_read_time_out 15000
tcp_connect_time_out 8000
socks5 127.0.0.1 1080

What you do is you tunnel an SSH connection to your server after going through tor service (torsocks do that, I don't really know how it works yet. I'll edit if I figure out).

And then :

proxychains iceweasel

If someone needs more in-depth explanations just ask ;)

il0venoobs
  • 61
  • 1
  • 2
  • 7