I&#x27;m building my tools from Node-Red, so they&#x27;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&#x27;t hard, but resolving .onions across the system is... So here&#x27;s how to do it.<p>(from my previous comment a few weeks ago)<p>*<p>4 points by kefka 18 days ago | parent | on: The Research Pirates of the Dark Web<p>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&#x27;s a way to do just that:<p>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.<p>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.<p>get the following packages (Ubuntu, Debian)<p><pre><code>    sudo apt-get install tor iptables dnsmasq dnsutils


 
</code></pre>
Add the following to the &#x2F;etc&#x2F;tor&#x2F;torrc file<p><pre><code>    VirtualAddrNetworkIPv4 10.192.0.0&#x2F;10
    AutomapHostsOnResolve 1
    TransPort 9040
    DNSPort 53
    DNSListenAddress 127.0.0.2
</code></pre>
Restart TOR<p><pre><code>    sudo service tor restart
</code></pre>
Edit &#x2F;etc&#x2F;dnsmasq.conf and add the following:<p><pre><code>    listen-address=127.0.0.1
    resolv-file=&#x2F;etc&#x2F;realresolv.conf
    server=&#x2F;onion&#x2F;127.0.0.2
</code></pre>
Make a new file, called &#x2F;etc&#x2F;realresolv.conf . Add this in the file:<p><pre><code>    nameserver 107.170.95.180
    nameserver 8.8.8.8
</code></pre>
Restart DNSmasq:<p><pre><code>    sudo service dnsmasq restart
</code></pre>
Run the IPtables firewall update for redirection<p><pre><code>    sudo iptables -t nat -A OUTPUT -p tcp -d 10.192.0.0&#x2F;10 -j REDIRECT --to-ports 9040
</code></pre>
Also, this script must be run at every boot, so add this in &#x2F;etc&#x2F;rc.local, ABOVE the &quot;exit 0&quot;<p><pre><code>    &#x2F;sbin&#x2F;iptables -t nat -A OUTPUT -p tcp -d 10.192.0.0&#x2F;10 -j REDIRECT --to-ports 9040

</code></pre>
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&#x27;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.<p>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.<p>cite: <a href="http:&#x2F;&#x2F;www.linuxquestions.org&#x2F;questions&#x2F;linux-networking-3&#x2F;h.." rel="nofollow">http:&#x2F;&#x2F;www.linuxquestions.org&#x2F;questions&#x2F;linux-networking-3&#x2F;h...</a>. , Have confirmed directions work flawlessly on Ubuntu 14.04, 15.04, and 15.10 (various flavors of Ubuntu, XUbuntu, KUbuntu)