[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-talk] how to access http://localhost/test.php through TBB



On 10/24/2012 03:35 PM, adrelanos wrote:
> esolve esolve:
>> hi, I know this question may seems strange, but I have some tests to do
>> over tor
>> I set up a LAMP, php webserver
>> and I want to access html pages on this server locally
>> but it seems to me that TBB can't connect to localhost, the error
>> information is as below:
>>
>> Unable to connect
>> Firefox can't establish a connection to the server at localhost.
>>
>> how can I deal with this problem? thanks!
>> _______________________________________________
>> tor-talk mailing list
>> tor-talk@xxxxxxxxxxxxxxxxxxxx
>> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk
>>
> 
> As Julian Yon already pointed out, you can not connect to localhost over
> Tor.
> 
> You can either directly connect to 127.0.0.1 (localhost) with Tor
> Browser or you can connect to your local webserver over Tor using a
> hidden service.
> 
> Just set up a hidden service for your local webserver. Of course you can
> access your own hidden domain with Tor Browser. The outgoing Tor
> connection doesn't mind coming back again from the Tor network as hidden
> service connection.

@esolve esolve: the answers above from adrelanos and Julian are correct.

Just get a VPS trial service for few days, free Amazon EC2 or something similar
- that's easiest way for testing.

Though from pure technical point it's possible to connect to "localhost", but
it's much more work compared to just renting a VPS. It's like building your own
"one-hop" Tor network:

- you need to run a local Tor OR node with modified code (DEFAULT_ROUTE_LEN in
src/or/or.h must be lowered => requires recompilation of Tor binary)
- node has been set to not publish descriptor ("PublishServerDescriptor 0" in
torrc)
- do some mucking with local DNS resolver, e.g. install bind/unbound/dnsmasq
locally, point your computer's DNS settings to it and set a custom domain to
resolve myspecialdomain.blabla to some "local" address - you also may have to
assign or create an network interface with "spoofed" non-private IP address
(i.e. outside of adresses like 127/8, 192.168/16, etc).

I did some development this way (more details, but may be outdated:
https://github.com/hiviah/tor-devel-environment). But as I said the VPS way is
just so much easier, so is the hidden-service way mentioned above - which seems
what you are after.

There's also Shadow but I didn't try it yet (https://shadow.cs.umn.edu/).

Ondrej
_______________________________________________
tor-talk mailing list
tor-talk@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk