I have a fresh install of Tor Browser 14.5.3 and have added the line “SocksPort auto” to the torrc
file in the tor-browser/Browser/TorBrowser/Data/Tor
directory. When I start TB I expected a randomly selected port to be assigned but instead the same port is assigned every time; 9150. In fact I can see the initially assigned port overridden with a connection to this port in my logs (below). If I set the SocksPort value to a fixed port number, like 9999 I get two connections - one to 9999 and one to 9150 (see second log extract).
Question: My guess is I may have added “SocksPort 9150” to a config file somewhere on my system in the past, so how do I find this file - i.e. where does Tor Browser search for configs which would override the above torrc
file? Alternatively, where is the 9150 vale coming from?
My system is Debian-based Linux.
2025-05-29 01:49:31.108
[NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.
2025-05-29 01:49:31.120
[NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.
2025-05-29 01:49:31.125
[NOTICE] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections.
2025-05-29 01:49:31.137
[NOTICE] Renaming old configuration file to "/home/me/tor-browser/Browser/TorBrowser/Data/Tor/torrc.orig.1"
2025-05-29 01:49:36.984
[NOTICE] Opening Socks listener on 127.0.0.1:0
2025-05-29 01:49:36.984
[NOTICE] Socks listener listening on port 36899.
2025-05-29 01:49:36.984
[NOTICE] Opened Socks listener connection (ready) on 127.0.0.1:36899
2025-05-29 01:49:36.985
[NOTICE] Opening Socks listener on 127.0.0.1:9150
2025-05-29 01:49:36.985
[NOTICE] Opened Socks listener connection (ready) on 127.0.0.1:9150
2025-05-29 01:49:36.985
[NOTICE] Opening Socks listener on 127.0.0.1:9150
2025-05-29 01:49:36.985
[WARN] Could not bind to 127.0.0.1:9150: Address already in use. Is Tor already running?
2025-05-29 01:49:36.985
[NOTICE] Closing no-longer-configured Socks listener on 127.0.0.1:36899
2025-05-29 01:49:37.755
[NOTICE] Bootstrapped 5% (conn): Connecting to a relay
2025-05-29 01:49:38.000
[NOTICE] Bootstrapped 10% (conn_done): Connected to a relay
2025-05-29 01:49:38.252
[NOTICE] Bootstrapped 14% (handshake): Handshaking with a relay
2025-05-29 01:49:38.998
[NOTICE] Bootstrapped 15% (handshake_done): Handshake with a relay done
2025-05-29 01:49:38.998
[NOTICE] Bootstrapped 20% (onehop_create): Establishing an encrypted directory connection
2025-05-29 01:49:39.245
[NOTICE] Bootstrapped 25% (requesting_status): Asking for networkstatus consensus
2025-05-29 01:49:39.490
[NOTICE] Bootstrapped 30% (loading_status): Loading networkstatus consensus
2025-05-29 01:49:41.620
[NOTICE] I learned some more directory information, but not enough to build a circuit: We have no usable consensus.
2025-05-29 01:49:41.957
[NOTICE] Bootstrapped 40% (loading_keys): Loading authority key certs
2025-05-29 01:49:42.377
[NOTICE] The current consensus has no exit nodes. Tor can only build internal paths, such as paths to onion services.
2025-05-29 01:49:42.377
[NOTICE] Bootstrapped 45% (requesting_descriptors): Asking for relay descriptors
2025-05-29 01:49:42.378
[NOTICE] I learned some more directory information, but not enough to build a circuit: We need more microdescriptors: we have 0/8464, and can only build 0% of likely paths. (We have 0% of guards bw, 0% of midpoint bw, and 0% of end bw (no exits in consensus, using mid) = 0% of path bw.)
2025-05-29 01:49:44.036
[NOTICE] Bootstrapped 50% (loading_descriptors): Loading relay descriptors
2025-05-29 01:49:49.026
[NOTICE] The current consensus contains exit nodes. Tor can build exit and internal paths.
2025-05-29 01:49:51.314
[NOTICE] Bootstrapped 55% (loading_descriptors): Loading relay descriptors
2025-05-29 01:49:51.486
[NOTICE] Bootstrapped 60% (loading_descriptors): Loading relay descriptors
2025-05-29 01:49:51.735
[NOTICE] Bootstrapped 68% (loading_descriptors): Loading relay descriptors
2025-05-29 01:49:51.995
[NOTICE] Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits
2025-05-29 01:49:52.847
[NOTICE] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
2025-05-29 01:49:52.848
[NOTICE] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
2025-05-29 01:49:53.813
[NOTICE] Bootstrapped 100% (done): Done
Log extract with “SocksPort 9999” set:
2025-05-29 01:51:49.488
[NOTICE] Opening Socks listener on 127.0.0.1:9999
2025-05-29 01:51:49.488
[NOTICE] Opened Socks listener connection (ready) on 127.0.0.1:9999
2025-05-29 01:51:49.488
[NOTICE] Opening Socks listener on 127.0.0.1:9150
2025-05-29 01:51:49.488
[NOTICE] Opened Socks listener connection (ready) on 127.0.0.1:9150