Actions

ZeroNet: Decentralized Censorship-resistant Network

From Whonix



ZeroNet - Decentralized websites

Introduction[edit]

The ZeroNet wiki describes the software design: [1]

ZeroNet [archive] uses Bitcoin cryptography and BitTorrent technology to build a decentralized censorship-resistant network. Users can publish static or dynamic websites in ZeroNet and visitors can choose to also serve the website. Websites will remain online even if it is being served by only one peer.

This means users are not identified or reachable by an IP address, since they are identified by a public key - specifically a public Bitcoin address. The private key owner can sign and publish changes, which are propagated through the network. Sites are accessed through an ordinary browser in combination with the Zeronet application. [2] The BitTorrent technology refers to the use of trackers to negotiate peer connections. [3] ZeroNet can be optionally configured to use Tor for anonymity. [4]

The Zeronet wiki describes various features and benefits, including: [1]

  • Password-less authorization - the user account is protected by the same cryptography that applies to Bitcoin wallets.
  • Easy setup. [5]
  • Immediate updating of sites in real time.
  • Works with any browser.
  • Full Tor network support, including onion services.
  • Content cannot be censored (removed) after publication.
  • It is impossible to shut down content, since content is served by any user who wishes to.
  • ZeroNet is fast and works offline.

Connecting to Tor before ZeroNet[edit]

These instructions lead to the following connection scheme in Whonix:

UserTorZeroNetInternet

Installation[edit]

Ambox notice.png This application requires incoming connections through a Tor onion service. Supported Whonix-Gateway ™ modifications are therefore necessary for full functionality; see instructions below.

For better security, consider using Multiple Whonix-Gateway ™ and Multiple Whonix-Workstation ™. In any case, Whonix ™ is the safest choice for running it. [6]

onion-grater Adjustments[edit]

Complete the following steps in Whonix-Gateway ™ (sys-whonix).

Extend onion-grater Whitelist

On Whonix-Gateway ™.

Create a new directory. [7]

sudo mkdir -p /usr/local/etc/onion-grater-merger.d/

Symlink the onion-grater profile to the onion-grater settings folder.

sudo ln -s /usr/share/doc/onion-grater-merger/examples/40_zeronet.yml /usr/local/etc/onion-grater-merger.d/

Restart onion-grater.

sudo service onion-grater restart

Modify Firewall Settings[edit]

Modify the Whonix-Workstation ™ (anon-whonix) user firewall settings and reload them.

1. Modify Whonix-Workstation ™ User Firewall Settings

Note: If no changes have yet been made to Whonix Firewall Settings, then the Whonix User Firewall Settings File /etc/whonix_firewall.d/50_user.conf appears empty (because it does not exist). This is expected.

If using Qubes-Whonix ™, complete these steps.
In Whonix-Workstation ™ AppVM.

Make sure folder /rw/config/whonix_firewall.d exists.

sudo mkdir -p /rw/config/whonix_firewall.d

Open /rw/config/whonix_firewall.d/50_user.conf with root rights.

sudoedit /rw/config/whonix_firewall.d/50_user.conf

If using a graphical Whonix-Workstation ™, complete these steps.

Start MenuApplicationsSettingsUser Firewall Settings

If using Non-Qubes-Whonix ™, complete this step.

In Whonix-Workstation ™, open the whonix_firewall configuration file in an editor.

sudo nano /etc/whonix_firewall.d/50_user.conf

For more help, press on Expand on the right.

Note: This is for informational purposes only! Do not edit /etc/whonix_firewall.d/30_default.conf

The Whonix Global Firewall Settings File /etc/whonix_firewall.d/30_default.conf contains default settings and explanatory comments about their purpose. By default, the file is opened read-only and is not meant to be directly edited. Below, it is recommended to open the file without root rights. The file contains an explanatory comment on how to change firewall settings.

## Please use "/etc/whonix_firewall.d/50_user.conf" for your custom configuration,
## which will override the defaults found here. When Whonix is updated, this
## file may be overwritten.

See also Whonix modular flexible .d style configuration folders.

To view the file, follow these instructions.

If using Qubes-Whonix ™, complete these steps.

Qubes App Launcher (blue/grey "Q")Template: whonix-ws-15Whonix Global Firewall Settings

If using a graphical Whonix-Workstation ™, complete these steps.

Start MenuApplicationsSettingsGlobal Firewall Settings

If using Non-Qubes-Whonix ™, complete this step.

In Whonix-Workstation ™, open the whonix_firewall configuration file in an editor.

nano /etc/whonix_firewall.d/30_default.conf

2. Open required external ports.

Add.

EXTERNAL_OPEN_PORTS+=" 15441 "
EXTERNAL_OPEN_PORTS+=" 33750 "

Save the file.

3. Reload Whonix-Workstation ™ Firewall.

If you are using Qubes-Whonix ™, complete the following steps.

Qubes App Launcher (blue/grey "Q")Whonix-Workstation ™ AppVM (commonly named anon-whonix)Reload Whonix Firewall

If you are using a graphical Whonix-Workstation ™, complete the following steps.

Start MenuApplicationsSystemReload Whonix Firewall

If you are using a terminal-only Whonix-Workstation ™, run.

sudo whonix_firewall

Install Dependencies[edit]

Run the following commands in Whonix-Workstation ™ terminal (Qubes-Whonix ™: whonix-ws-15 TemplateVM).

Update the package lists.

sudo apt-get update

Install dependencies.

sudo apt-get install git python3-pip

Retrieve the Signing Key[edit]

Run the following command in Whonix-Workstation ™ terminal (Qubes-Whonix ™: anon-whonix AppVM).

Retrieve the ZeroNet signing key. [8]

Whonix first time users warning Warning:

The following command using gpg with --recv-keys is not recommended for security reasons and is often non-functional. [9] This is not a Whonix ™-specific issue. The OpenPGP public key should be downloaded from the web instead; see also Secure Downloads. This procedure is currently undocumented and can be resolved as per the Free Support Principle. Documentation contributions will be happily considered.

ZeroNet feature request: upload ZeroNet gpg signing key [archive]

gpg --recv-keys "960F FF2D 6C14 5AA6 13E8 491B 5B63 BAE6 CB96 13AE"

Install ZeroNet[edit]

Run the following commands in Whonix-Workstation ™ terminal (Qubes-Whonix ™: anon-whonix AppVM).

ZeroNet is not yet packaged for Debian, so it must be manually installed. [10] [11]

Download ZeroNet.

git clone https://github.com/HelloZeroNet/ZeroNet.git

Navigate to the ZeroNet folder.

cd ZeroNet

Check the ZeroNet signature.

git log --show-signature

Install dependencies of ZeroNet. There is currently no better way than using a third party repository and third party package manager pip. [12]

warning Security warning: Adding a third party repository allows the vendor to replace any package on your system. Proceed at your own risk! See Foreign Sources for further information. For greater safety, users adding third party repositories should always use Multiple Whonix-Workstation ™ to compartmentalize VMs with additional software.

sudo python3 -m pip install -r requirements.txt

Launch ZeroNet[edit]

1. Launch the ZeroNet process.

Qubes-Whonix ™:

./zeronet.py --tor always --fileserver_ip $(qubesdb-read /qubes-ip)

Non-Qubes-Whonix ™:

./zeronet.py --tor always --fileserver_ip 10.152.152.11

2. Launch Tor Browser.

Start Tor Browser.

If you are using Qubes-Whonix ™.

Qubes Start MenuWhonix-Workstation ™ AppVM (commonly called anon-whonix)Tor Browser

If you are using Non-Qubes-Whonix ™.

Start MenuTor Browser

If you are using a terminal (Konsole).

torbrowser

3. Adjust Tor Browser's configuration.

Note: The following steps will no longer be required once Whonix releases a custom Tor Browser for connecting to alternative networks. [13]

Configure Tor Browser to connect to localhost.

Ambox warning pn.svg.png Warning:

  • This step changes the web fingerprint of Tor Browser!
  • Leave all other settings as is!

In Tor Browser:

  1. Type about:config into the URL bar.
  2. Press Enter
  3. Search for network.proxy.no_proxies_on
  4. Set to 0

4. Navigate to the ZeroNet web interface.

Paste http://127.0.0.1:43110 [archive] into Tor Browser's URL field and press Enter. For additional tips on visiting sites, see: How does it work? [archive]

The process is now complete and ZeroNet should be fully functional in Whonix ™. [14]

Footnotes[edit]

  1. 1.0 1.1 https://zeronet.readthedocs.io/en/latest/ [archive]
  2. ZeroNet acts as a local web server for these pages.
  3. https://en.wikipedia.org/wiki/ZeroNet [archive]
  4. https://zeronet.io/docs/faq/#how-to-use-zeronet-with-tor [archive]
  5. Although the Chinese government has blocked the ZeroNet website and bittorrent tracker.
  6. Security considerations:
    • By using Whonix ™, additional protections are in place for greater security.
    • This application requires access to Tor's control protocol.
    • In the Whonix ™ context, Tor's control protocol has dangerous features. The Tor control command GETINFO address reveals the real, external IP of the Tor client.
    • Whonix ™ provides onion-grater, a Tor Control Port Filter Proxy - filtering dangerous Tor Control Port commands.
    • When this application is run inside Whonix ™ with an onion-grater whitelist extension, this will limit application rights to Tor control protocol access only. Non-whitelisted Tor control commands such as GETINFO address are rejected by onion-grater in these circumstances.
    • During the application's normal operations it should not attempt to use dangerous Tor control commands such as GETINFO address. In the event the application or Whonix-Workstation ™ are compromised, this command would be rejected.
    • In comparison, if the application is run on a non-Tor focused operating system like Debian, it will have unlimited access to Tor's control protocol (a less secure configuration).
    • If the (non-)Whonix platform is used to host onion services, then running applications are more vulnerable to attacks against the Tor network compared to when Tor is solely used as a client; see also Onion Services Security.
    In conclusion, Whonix ™ is the safest and correct choice for running this application.
  7. Using /usr/local/etc/onion-grater-merger.d/ because that onion-grater settings folder is persistent in Qubes-Whonix ™ TemplateBased ProxyVMs i.e. Whonix-Gateway ™ (commonly called sys-whonix). Non-Qubes-Whonix ™ users could also utilize /etc/onion-grater-merger.d/. Qubes-Whonix ™ users could also utilize /etc/onion-grater-merger.d/ but then /etc/onion-grater-merger.d/ must be made persistent, which means doing this procedure inside the Whonix-Gateway ™ TemplateVM (commonly called whonix-gw-15) and then restarting the Whonix-Gateway ™ ProxyVM or using bind-dirs [archive]. Both techniques are more complicated than simply using /usr/local/etc/onion-grater-merger.d/, since it is persistent either way. Further, it even allows multiple Whonix-Gateway ™ ProxyVMs based on the same Whonix-Gateway ™ TemplateVM; for example, one Whonix-Gateway ™ ProxyVM extending and relaxing onion-grater's whitelist and the other Whonix-Gateway ™ ProxyVM having the default onion-grater whitelist which is more restrictive.
  8. https://github.com/HelloZeroNet/ZeroNet/issues/759 [archive]
  9. https://forums.whonix.org/t/gpg-recv-keys-fails-no-longer-use-keyservers-for-anything/5607 [archive]
  10. https://github.com/HelloZeroNet/ZeroNet/issues/241 [archive]
  11. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850474 [archive]
  12. ZeroNet dependencies are not available in Debian. https://github.com/HelloZeroNet/ZeroNet/issues/241#issuecomment-474427733 [archive]
  13. Except in the case of YaCy, which needs internet access.
  14. Functionality was last confirmed in mid-2018.

Did you know that anyone can edit the Whonix wiki [archive] to improve it?

https [archive] | (forcing) onion [archive]
Follow: Twitter.png Facebook.png 1280px-Gab text logo.svg.png Rss.png 1024px-Telegram 2019 Logo.svg.png Discourse logo.svg

Donate: Donate Bank Wire Paypal Bitcoin accepted here Monero accepted here Contriute

Whonix donate bitcoin.png

Share: Twitter | Facebook

This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! Read, understand and agree to Conditions for Contributions to Whonix ™, then Edit! Edits are held for moderation.

Copyright (C) 2012 - 2019 ENCRYPTED SUPPORT LP. Whonix ™ is a trademark. Whonix ™ is a licensee [archive] of the Open Invention Network [archive]. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Freedom Software license as Whonix ™ itself. (Why?)

Whonix ™ is a derivative of and not affiliated with Debian [archive]. Debian is a registered trademark [archive] owned by Software in the Public Interest, Inc [archive].

Whonix ™ is produced independently from the Tor® [archive] anonymity software and carries no guarantee from The Tor Project [archive] about quality, suitability or anything else.

By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent. Whonix ™ is provided by ENCRYPTED SUPPORT LP. See Imprint.

Monero donate whonix.png