OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Documentation and Translation (Moderator: fabian) »
  • How do I get the tor Control Port Password?
« previous next »
  • Print
Pages: [1]

Author Topic: How do I get the tor Control Port Password?  (Read 8831 times)

ChrisC

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
    • View Profile
How do I get the tor Control Port Password?
« on: January 01, 2022, 02:05:36 am »
At https://docs.opnsense.org/manual/how-tos/tor.html, it says "... This Port requires a password, which will not be disclosed to the GUI but can be queried via the API." with no further explanation.
How do I find this out?
I can't set one myself as the file /usr/local/etc/tor/torrc gets overwritten every time it restarts :(
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: How do I get the tor Control Port Password?
« Reply #1 on: January 01, 2022, 11:38:08 am »
The UI loads the API so you can see it in the traffic. It is alsy in the config.xml
Logged

ChrisC

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
    • View Profile
Re: How do I get the tor Control Port Password?
« Reply #2 on: January 01, 2022, 06:25:03 pm »
Thank you.
I found it at "<control_port_password>" in the config.xml you mentioned.
Is there a way of adding other commands into torrc?
I want to use nyx, and to get the connection information, and for that to work, I need to add
Code: [Select]
DisableDebuggerAttachment 0 to the torrc file. How can I do this without it being overwritten each time tor starts?

Thanks,
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: How do I get the tor Control Port Password?
« Reply #3 on: January 01, 2022, 06:59:15 pm »
No, you cannot add custom options via the GUI
Logged

mrpsycho

  • Newbie
  • *
  • Posts: 33
  • Karma: 2
    • View Profile
Re: How do I get the tor Control Port Password?
« Reply #4 on: April 28, 2022, 09:31:07 pm »
@chrisC as a VERY DIRTY solution you can add strrings to /usr/local/opnsense/service/templates/OPNsense/Tor/torrc

this one is template, which is used to generate config on each restart.

and it will allow to live a bit longer without editing exact torrc file till next time tor will be upgraded.

as a reminder, you can also add trigger to monit, that will send you message, where your line is absent.
Logged

trustno1foxm

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: How do I get the tor Control Port Password?
« Reply #5 on: November 29, 2024, 10:48:03 am »
Quote from: mrpsycho on April 28, 2022, 09:31:07 pm
as a reminder, you can also add trigger to monit, that will send you message, where your line is absent.

how would that work? would you be so kind and give an example?
thx!

so long
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Documentation and Translation (Moderator: fabian) »
  • How do I get the tor Control Port Password?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2