Tor: Difference between revisions

Layer-09 (talk | contribs)
mNo edit summary
Layer-09 (talk | contribs)
m Made Tips and Tricks titles bigger
 
Line 1: Line 1:
<div style="border: 1px solid #D33; background-color: #FFEBEB; padding: 12px; line-height: 1.7; border-radius: 5px; margin: 5px 0px;">
<div style="border: 1px solid #D33; background: #FFEBEB; padding: 30px; border-radius: 5px; margin: 10px 0px; display: flex; align-items: center;">
<span style="color: #D33; font-size: 20px; float: left; margin-right: 10px;">⚠</span>
    <div style="color: #D33; font-size: 40px; margin-right: 15px; background: #FFEBEB; display: flex; line-height: 0; align-items: center;">⚠</div>
<div style="overflow: hidden;"><strong>Tor is not a panacea.</strong> To achieve effective anonymity with Tor, you must understand its <strong>caveats</strong> and adjust your <strong>browsing habits</strong>. The Tor Project provides a crucial [https://support.torproject.org/faq/staying-anonymous/ list of tips] that you should read before using Tor.</div>
    <div style="color: #D33; font-size: 15px; font-style: normal; font-weight: 400; line-height: normal; text-align: left;"><strong>Tor is not a panacea.</strong> To achieve effective anonymity with Tor, you must understand its <strong>caveats</strong> and adjust your <strong>browsing habits</strong>. The Tor Project provides a crucial [https://support.torproject.org/faq/staying-anonymous/ list of tips] that you should read before using Tor.</div>
</div>
</div>


Line 110: Line 110:
In case your Tor relay is running behind a NAT network, be sure to forward the ORPort to your server running Tor.
In case your Tor relay is running behind a NAT network, be sure to forward the ORPort to your server running Tor.


= Tips and Tricks =
== Tips and Tricks ==
==== Location of Option ====
=== Location of Option ===
The global options are listed on [https://mynixos.com/search?q=tor MyNixOS].  
The global options are listed on [https://mynixos.com/search?q=tor MyNixOS].  


==== Relay Management ====
=== Relay Management ===
Tor relays are servers that help anonymize internet traffic by routing it through a series of nodes. Each relay in the Tor network plays a crucial role in maintaining the privacy and security of users by ensuring that no single point can trace the origin and destination of the data. The primary purpose of Tor relays is to facilitate anonymous communication and protect users from network surveillance and traffic analysis.
Tor relays are servers that help anonymize internet traffic by routing it through a series of nodes. Each relay in the Tor network plays a crucial role in maintaining the privacy and security of users by ensuring that no single point can trace the origin and destination of the data. The primary purpose of Tor relays is to facilitate anonymous communication and protect users from network surveillance and traffic analysis.


Line 136: Line 136:
* '''Liability:''' Exit relay operators may face legal scrutiny if their relays are used for illegal activities. It is important for operators to understand the potential legal implications and take appropriate measures to protect themselves.
* '''Liability:''' Exit relay operators may face legal scrutiny if their relays are used for illegal activities. It is important for operators to understand the potential legal implications and take appropriate measures to protect themselves.


==== Client Bridge ====
=== Client Bridge ===
<div style="border: 1px solid #D33; background-color: #FFEBEB; padding: 12px; line-height: 1.7; border-radius: 5px; margin: 5px 0px;">
<div style="border: 1px solid #D33; background: #FFEBEB; padding: 30px; border-radius: 5px; margin: 10px 0px; display: flex; align-items: center;">
<span style="color: #D33; font-size: 20px; float: left; margin-right: 10px;">⚠</span>
    <div style="color: #D33; font-size: 40px; margin-right: 15px; background: #FFEBEB; display: flex; line-height: 0; align-items: center;">⚠</div>
<div style="overflow: hidden;"><strong>Security Warning:</strong> Do not attempt to use Tor with any web browsers other than Tor Browser. Tor Browser integrates custom modifications to Firefox to enhance anonymity and ensure that information leakage does not occur. Using another web browser with Tor is likely to result in imperfect anonymity and is unsafe.</div>
    <div style="color: #D33; font-size: 15px; font-style: normal; font-weight: 400; line-height: normal; text-align: left;">Do not attempt to use Tor with any web browsers other than Tor Browser. Tor Browser integrates custom modifications to Firefox to enhance anonymity and ensure that information leakage does not occur. Using another web browser with Tor is likely to result in imperfect anonymity and is unsafe.</div>
</div>
</div>
Tor can be enabled as a system service by enabling options {{nixos:option|services.tor.enable}}. Configuration of tor service is an example of [https://nixos.org/manual/nixos/stable/index.html#sec-freeform-modules Freeform module], so you can pass not only explicitly supported {{nixos:option|services.tor.settings}}, but all other [https://2019.www.torproject.org/docs/tor-manual.html.en torrc] options. For example, client bridge config can be set like this:
Tor can be enabled as a system service by enabling options {{nixos:option|services.tor.enable}}. Configuration of tor service is an example of [https://nixos.org/manual/nixos/stable/index.html#sec-freeform-modules Freeform module], so you can pass not only explicitly supported {{nixos:option|services.tor.settings}}, but all other [https://2019.www.torproject.org/docs/tor-manual.html.en torrc] options. For example, client bridge config can be set like this:


Line 155: Line 156:
By also enabling {{nixos:option|services.tor.client.enable}}, an additional SOCKS service on port 9063 can be enabled. This is a "fast" SOCKS port suitable for browser use; a new circuit is established every ten minutes.
By also enabling {{nixos:option|services.tor.client.enable}}, an additional SOCKS service on port 9063 can be enabled. This is a "fast" SOCKS port suitable for browser use; a new circuit is established every ten minutes.


==== Sandboxing ====
=== Sandboxing ===


You can also run the [[Tor Browser in a Container]].
You can also run the [[Tor Browser in a Container]].
Line 161: Line 162:
Alternatively, Tor can be configured together with the [[Firejail#Torify_application_traffic|Firejail]] sandboxing solution.
Alternatively, Tor can be configured together with the [[Firejail#Torify_application_traffic|Firejail]] sandboxing solution.


==== Faster Reconnects on Network Switch ====
=== Faster Reconnects on Network Switch ===
Using [[Systemd/networkd/dispatcher]] it is possible to restart the Tor daemon every time a network reconnect is performed. This avoids having to wait for Tor network timeouts and reestablishes a new connection faster.
Using [[Systemd/networkd/dispatcher]] it is possible to restart the Tor daemon every time a network reconnect is performed. This avoids having to wait for Tor network timeouts and reestablishes a new connection faster.


Line 169: Line 170:
An alternative approach is use both a wrapper and built-in proxy support. This way, if the application's proxy support fails, the connection is likely to be caught by the wrapper and if you run the application without the wrapper by mistake, the connections are still likely to be proxied.
An alternative approach is use both a wrapper and built-in proxy support. This way, if the application's proxy support fails, the connection is likely to be caught by the wrapper and if you run the application without the wrapper by mistake, the connections are still likely to be proxied.


==== KDE Integration ====
=== KDE Integration ===
'''KDE Proxy Configuration'''
'''KDE Proxy Configuration'''
In KDE, proxy server configuration is set for all applications centrally. You should set the SOCKS proxy to Tor's default SOCKS port (127.0.0.1:9050), and set the HTTP proxy to Privoxy (127.0.0.1:8118).
In KDE, proxy server configuration is set for all applications centrally. You should set the SOCKS proxy to Tor's default SOCKS port (127.0.0.1:9050), and set the HTTP proxy to Privoxy (127.0.0.1:8118).
Line 183: Line 184:
KMail respects KDE-wide proxy settings, and the "safe" SOCKS port offers good isolation between mailboxes.
KMail respects KDE-wide proxy settings, and the "safe" SOCKS port offers good isolation between mailboxes.


==== DNS over Tor ====
=== DNS over Tor ===
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services = {
services = {
Line 205: Line 206:
Please refer to [https://wiki.archlinux.org/title/Tor#TorDNS ArchWiki] for details.
Please refer to [https://wiki.archlinux.org/title/Tor#TorDNS ArchWiki] for details.


= References =
== References ==


# https://support.torproject.org/tbb/tbb-9  
# https://support.torproject.org/tbb/tbb-9