3 ms·
I'm building my tools from Node-Red, so they're in JSON. But the caveat is they fill my niche I need. The TOR part, is something that would work everywhere. Con
by kefka 11y ago
I'm building my tools from Node-Red, so they're in JSON. But the caveat is they fill my niche I need. The TOR part, is something that would work everywhere. Configuring Hidden Services isn't hard, but resolving .onions across the system is... So here's how to do it.
(from my previous comment a few weeks ago)
*
4 points by kefka 18 days ago | parent | on: The Research Pirates of the Dark Web
I find the way TOR is used lacking. I really would like to have .Onion resolution across my whole system (in my case, I extensively use Linux). So, Here's a way to do just that:
I use a significant amount of HiddenServices to communicate back and forth with my machines. My eventual goal was to be able to process data from different geographical areas and have them inserted into MQTT via Node-Red. Until now, it was all or nothing with regards to proxy settings.
I have figured that out. For those that want to integrate seamless .onion usage across the whole of Node-Red (and every other Linux program), follow this.
get the following packages (Ubuntu, Debian)
sudo apt-get install tor iptables dnsmasq dnsutils
Add the following to the /etc/tor/torrc file
VirtualAddrNetworkIPv4 10.192.0.0/10
AutomapHostsOnResolve 1
TransPort 9040
DNSPort 53
DNSListenAddress 127.0.0.2
Restart TOR
sudo service tor restart
Edit /etc/dnsmasq.conf and add the following:
listen-address=127.0.0.1
resolv-file=/etc/realresolv.conf
server=/onion/127.0.0.2
Make a new file, called /etc/realresolv.conf . Add this in the file:
nameserver 107.170.95.180
nameserver 8.8.8.8
Restart DNSmasq:
sudo service dnsmasq restart
Run the IPtables firewall update for redirection
sudo iptables -t nat -A OUTPUT -p tcp -d 10.192.0.0/10 -j REDIRECT --to-ports 9040
Also, this script must be run at every boot, so add this in /etc/rc.local, ABOVE the "exit 0"
/sbin/iptables -t nat -A OUTPUT -p tcp -d 10.192.0.0/10 -j REDIRECT --to-ports 9040
Once you do those things, your whole Linux sustem will be able to resolve .onion addresses seamlessly, yet leaving alone canonical address schemes. this means that you can talk with a MQTT-out on an .onion, or control remote servers via exec node and SSH. And since you don't have to poke holes through firewalls, networking between Hidden Nodes with Node-Red sitting on top makes IoT sensor capture from remote areas (Work, home, car, hackerspace) very easy.
Of course, this does not discuss how to actually add a new hidden service You should think very hard before enabling a service: Make sure there is good authentication on them along with the newest updates. There is no determining origination on these kinds of attacks.
cite: http://www.linuxquestions.org/questions/linux-networking-3/h.. http://www.linuxquestions.org/questions/linux-networking-3/h.... , Have confirmed directions work flawlessly on Ubuntu 14.04, 15.04, and 15.10 (various flavors of Ubuntu, XUbuntu, KUbuntu)
- Spakman 11y agoThank you very much. This has given me a lot of food for thought. I hadn't ever considered TOR for NAT traversal for a start.
- kefka 11y agoI'm glad I have :) HN seems to have gotten poisonous with people saying "you cant, you wont, you shouldnt".. and yet the alternative solutions aren't posited. That disturbs me. I try to set a rule, that if I complain about something, I try to have an alternate path to go forward. Right now, I'm looking into IPFS (interplanetary file system. tldr: single worldwide git repo backed by bittorrent). So far, I've been able to share a staggering amount of content quickly. Our hackerspace has decent bandwith, except when we have open house nights every wednesday. Using IPFS allowed me to share the newest Star Trek Horizon movie with 10 machines in ~6 minutes. Turns out, they are also working on IPFS-aware Tor, so that the file hosters can reside purely in .onion space. You can probably see why that is interesting to me: worldwide backed tor repo access. Files can be hosted with little/no knowledge who they came from, or to unknown destinations. I'm also working on porting http://s-macke.github.io/jor1k/demos/main.html http://s-macke.github.io/jor1k/demos/main.html so it resides purely on IPFS, including your user data (just stored in a separate key). This would allow distributed computing in a Linux js environment, with networking support... unlike Ethereum which processes data in "Instructions per second" speeds (10^8 slower than your laptop). I've my hands full, but distributed applications are really, finally here. It's what I can call the cloud, without hearing "other peoples' servers" in the back of my head.