TORch: Illuminating the Path to your Node
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.0 KiB

2 years ago
  1. # TORch: Illuminating the Path to your Node
  2. TORch is a solution for creating an SSH-via-Tor backdoor on a remote device as a means of fallback remote management and initial headless device configuration.
  3. ## Description
  4. Since Tor traffic easily crosses NAT boundries, this is a nice solution for
  5. * fallback connection to remote devices located on other LANs in the event that the network configuration on the remote side changes and the primary connection / VPN fails
  6. * the initial discovery and connection to a headless device like a Raspberry Pi on a local network which is configured via DHCP
  7. A TORch solution consists of 3 processes:
  8. * `torch-agent` - Installed on remote machine; responsible for creating Tor hidden service and broadcasting the onion hostname an MQTT broker
  9. * MQTT broker - Any MQTT broker, reachable via IPv4 or Tor, through TLS or insecure communications
  10. * `torch-subscriber` - Listens for and handles onion hostname publications
  11. ## Build Debian Package
  12. If you don't already have a GPG key, generate one:
  13. ```bash
  14. gpg --full-generate-key
  15. ```
  16. Using the e-mail address you provided during GPG key generation, run `` to build a Debian package and install it
  17. ```bash
  18. ./ [email protected]
  19. apt update && apt install build/torch-agent_0.0.1-1_all.deb
  20. ```
  21. This will:
  22. * create a local user `torch`
  23. * install the TORch agent as a Systemd service named `torch-agent`
  24. * modify `/etc/tor/torrc` to activate control via the Tor Controller port
  25. ## Configuration
  26. The TORch agent will look for a `torch.conf` configuration in the configuration directory.
  27. The configuation directory can be specified by
  28. * The `TORCH_CONFIG_DIR` environment variable
  29. * Using the `--config-dir` commandline option
  30. * Default: `/etc/torch`
  31. A fully configured example can be found [here](example)
  32. See the sample [`torch.conf`](torch.conf) file for additional configuration options and details
  33. ## Roadmap
  34. [ ] Create a [pi-gen]( image with TORch agent installed and `/boot` partition configuration