OPNsense Forum

English Forums => Documentation and Translation => Topic started by: ChrisC on January 01, 2022, 02:05:36 am

Title: How do I get the tor Control Port Password?
Post by: ChrisC on January 01, 2022, 02:05:36 am
At https://docs.opnsense.org/manual/how-tos/tor.html (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 :(
Title: Re: How do I get the tor Control Port Password?
Post by: fabian 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
Title: Re: How do I get the tor Control Port Password?
Post by: ChrisC 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 (https://nyx.torproject.org), 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,
Title: Re: How do I get the tor Control Port Password?
Post by: fabian on January 01, 2022, 06:59:15 pm
No, you cannot add custom options via the GUI
Title: Re: How do I get the tor Control Port Password?
Post by: mrpsycho 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.