How to Create a TOR Website Quickly.steemCreated with Sketch.

in #technology7 years ago

OK lets make this quick!


So once you get past the:
hidden service setup
Add the following lines to your torrc:
HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:8080

The "Tor" part is no longer important.
When you run tor, the /hidden_service/ dir will contain your onion address (e.g. something like rrcc5uuudhh4oz3c, which woud mean you got rrcc5uuudhh4oz3c.onion)

Any tcp connection to rrcc5uuudhh4oz3c.onion on port 80 will be forwarded to IP address 127.0.0.1 port 8080.you can have that second part to be whatever you want, e.g. 93.184.216.34:80 will connect any tcp request coming to rrcc5uuudhh4oz3c.onion port 80 to 93.184.216.34 port 80 (example.com) (which would probably give you a "not found" - I'll come back to that).

This is what I meant by "forwarding the port" on your physical router when self hosting.



Source


After that, setup is no different than any other website (which is why I used the example.com example) - apache -thttpd - nanohttpd - ms IIS - any web sever that can serve http requests.

The caveat is you probably want "extra" precautions on your web server to stop the "bad guys" doing something that would reveal its "clearnet" IP. The most obvious of these is if the webserver can contact the internet, and they get it to contact them (for example getting it to try and run a script on www.badguysserver.com/exposeme.php).

Proxies: I've heard good things about nginx, but never tried it myself. e.g.
https://www.nginx.com/solutions/load-balancing/

Apache is probably the most "fully fledged" free webserver supporting all the php/mysql magic (aka LAMP - Linux Apache Mysql PHP)

The reason www.example.com and 93.184.216.34 serve different pages is because the browser tells the server which website it wants, (host:www.example.com vs host:93.184.216.34) and you can configure web servers to serve different sites on the same IP.

The "safe" solution if you go for server software like Apache is to have it configured on a local network where it can only communicate on the local network (e.g. manually forcing its gateway configuration to not use a real gateway and setting firewall settings just to be safe) simply because there are hundreds of ways, known and unknown to get apache to contact clearnet servers reveal its "real" IP address if it is able to connect to the clearnet.

My recommendation for building a site on tor, rather than http or apache would be nanohttpd

Simply because you can lock the code up tighter than a knats arse with the Java permission system, and Java is a much better language to write server side code in than PHP.

Happy site building!

@mindhunter


Sort:  

Good work @mindhunter

Nice post
Upvoted..and followed .. hopping to have your support and upvote
Thanks for sharing
have a great weekend

We are conspiring...)

One blockchain. One love.<3

That's my Steemit marketing tagline for life :)

I bloody well love it! I ain't parting with that one @dimarss :)

I also fall in love with this place @mindhunter!

MIAOW! [in agreement] :)

This post has been ranked within the top 50 most undervalued posts in the second half of May 13. We estimate that this post is undervalued by $12.36 as compared to a scenario in which every voter had an equal say.

See the full rankings and details in The Daily Tribune: May 13 - Part II. You can also read about some of our methodology, data analysis and technical details in our initial post.

If you are the author and would prefer not to receive these comments, simply reply "Stop" to this comment.

Do you ever venture onto the darknet??

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 64741.88
ETH 3457.21
USDT 1.00
SBD 2.55