# proxychains as non-root user

## Sheldon

Hello,

when I use proxychains as root, all works well:

example:

proxychains ping www.suse.de

ProxyChains-3.1 (http://proxychains.sf.net)

|DNS-request| www.suse.de

|S-chain|-<>-192.168.0.231:9050-<><>-4.2.2.2:53-<><>-OK

|DNS-response| www.suse.de is 195.135.220.3

when I use it as normal user,  I get an error:

user@keko ~/temp $ proxychains ping www.suse.de

ProxyChains-3.1 (http://proxychains.sf.net)

ERROR: ld.so: object 'libproxychains.so' from LD_PRELOAD cannot be preloaded: ignored.

PING turing.suse.de (195.135.220.3) 56(84) bytes of data.

So, I test it with konqueror and when I redirect konqueror through tor(with proxychains) (tor is running an an other machine) as root it works.

when I do the same as normal user: it is not redirected through tor. 

Shouldn't it bo done, using proxychains as normal user?

----------

## BradN

user@keko ~/temp $ proxychains ping www.suse.de

ProxyChains-3.1 (http://proxychains.sf.net)

ERROR: ld.so: object 'libproxychains.so' from LD_PRELOAD cannot be preloaded: ignored. 

I know for certain you won't be able to do this as non-root through ping because ping is suid to execute as root (and preloading a library on a suid executable could elevate privileges and be a gaping security hole).

I believe preloading should be possible as non-root on other executables though, but I'm not 100% sure.  What kind of messages do you get when you do this with konqueror?

----------

## Sheldon

Yes, as with konqueror I get no Error. That is true. But so it does not work, what means it is not routet through tor. I checked it with the

check-tor - page.

As root I get the message: You are using tor 

and as user not.

----------

## BradN

Hmm, I'm only familiar with konqueror for KDE 3.5, and in that, a separate executable is run to do the actual http connections.  So I would expect in 3.5, it might not work at all.  But I'm not sure if something similar could be happening in 4.x.  I would suspect if it was like that, it wouldn't work at all, even as root.

Does this work with other programs when logged in as a user?  Like, you could try it wget'ing that check tor page.

----------

## Sheldon

There I reache the edges of my imagination at the moment. 

I test the functionality with the tor-test page. 

So, how will I test that with wget?

Ah, perhaps i can test it with links. I will try it tomorrow morning.

----------

## BradN

Either would probably be sufficient, unless it relies on javascript or something like that, then links might have a chance.

Otherwise, you would just wget whatever http page you normally would for the test, and open the saved file with a web browser to look at it.

----------

## Sheldon

It seems, you are right in some way. With links it works both root and user. Good so far.

Now I  attemt to understand. 

That konqueror does not work this way is not a problem. There are the settings(in konqueror)for using a 

proxy, which works (I used konqueror only for understanding or solving the following):

My underlying problem is to get VirtualBox running with

proxychains. And with VirtualBox I've the same problem as with konqueror - I believe.

I can't test it right. If I start VBox as user (w. proxychains), it will not go through tor.

As root, I am not able to get my vdi's running there. So I'ven't tested it so far.

Likely it is not possible doing this with vbox? 

Or what is the most cleverly way doing this with vbox?

----------

## BradN

You may be able to set proxies inside the virtual box image, but otherwise I suspect you might be stuck running it as root.  The only other thing I can think of is if there's a way to do transparent proxying within linux using iptables or whatever.  It might be worth a shot checking but I suspect it's a lot of work to get set up correctly.

----------

## Sheldon

Yes a transparent proxy, a charming idea but to timeeating and complicated for me. I've set up arnos iptable script. And there i do only do things which are easy to configure. I tried own rules but i think, there ive no talent for. 

Yes as root it works - with virtual box. That's ok for me. But I didn't catch the point why it won't work as user?

----------

