Silk Road forums

Support => Technical support => Topic started by: badboy97 on February 15, 2012, 04:32 am

Title: Configuring MySQL with tor hidden service 10btc reward
Post by: badboy97 on February 15, 2012, 04:32 am
Any tech gurus out there know anything about configuring MySQL with tor hidden services?

I got my server up and running and php is configured correctly, but not sure how to route MySQL through tor.  I was thinking maybe running MySQL proxy, but do not know enough about tor to know for sure.  I'll give anyone who helps me get it running 10btc for their efforts.

BB
Title: Re: Configuring MySQL with tor hidden service 10btc reward
Post by: QTC on February 15, 2012, 05:18 am
Your question doesn't really make sense, setting up lamp and variants on servers with hidden location services is for the most part exactly the same as on vanilla servers. If you need help hardening your MySQL installation or anything else this is where I really shine, let me know and we can take it to PM because it'll be way out of scope for this board (although maybe useful for the security forum at some point).
Title: Re: Configuring MySQL with tor hidden service 10btc reward
Post by: supersecretsquirrel on February 15, 2012, 07:37 am
I got my server up and running and php is configured correctly, but not sure how to route MySQL through tor.  I was thinking maybe running MySQL proxy, but do not know enough about tor to know for sure.  I'll give anyone who helps me get it running 10btc for their efforts.

Do you really need to route it through Tor? What happened to connecting to localhost?
Title: Re: Configuring MySQL with tor hidden service 10btc reward
Post by: a_blackbird on February 15, 2012, 08:07 am
Do you really need to route it through Tor? What happened to connecting to localhost?

+1 for localhost.  I just can't imagine MySQL over Tor even being usable for anything more than a toy application,
Title: Re: Configuring MySQL with tor hidden service 10btc reward
Post by: badboy97 on February 15, 2012, 01:16 pm
When I configured my server to run as a hidden service I no longer have access to my localhost.  Only way I can access the server is through tor.
Title: Re: Configuring MySQL with tor hidden service 10btc reward
Post by: supersecretsquirrel on February 15, 2012, 01:17 pm
When I configured my server to run as a hidden service I no longer have access to my localhost.  Only way I can access the server is through tor.

Sure, that's for external access. Assuming the web server and the MySQL server is running on the same host, you can set up MySQL to talk to localhost/127.0.0.1 directly.
Title: Re: Configuring MySQL with tor hidden service 10btc reward
Post by: kmfkewm on February 17, 2012, 03:01 pm
localhost ftw
Title: Re: Configuring MySQL with tor hidden service 10btc reward
Post by: supersecretsquirrel on February 17, 2012, 04:19 pm
Did I win?
Title: Re: Configuring MySQL with tor hidden service 10btc reward
Post by: a_blackbird on February 17, 2012, 09:44 pm
When I configured my server to run as a hidden service I no longer have access to my localhost.  Only way I can access the server is through tor.

The server can always talk to itself via localhost.  Just put this in your my.cnf in the [mysqld] section.

bind_address = 127.0.0.1

Although if it's all on the same host, you don't even need networking - PHP can connect via the unix domain socket - and it's going to be much faster because you don't have the overhead of setting up and tearing down a TCP connection.  If you want to do that, you might as well turn MySQL's network code off entirely via:

skip_networking = 1

Assuming that your PHP and MySQL installations are via whatever package manager your distribution comes with, that should be all you need to do.  But if you've installed either one from source or from a binary tarball and your mysql.sock file is in a non-standard location, just edit the value of mysql.default_socket in your php.ini file.