1

I try to set up a local redirection through tor as described here: https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy

My system is Ubuntu 15.04. Fresh Tor installation works fine. However, when I add 'DNSPort 53' line to torrc, Tor Browser refuses to launch and quits with an error 'Tor unexpectedly exited. This might be due to a bug in Tor itself...'. What could be the possible cause of this?

torrc looks as follows:

# This file was generated by Tor; if you edit it, comments will not be preserved
# The old torrc file was renamed to torrc.orig.1 or similar, and Tor will ignore it

VirtualAddrNetworkIPv4 10.192.0.0/10
AutomapHostsOnResolve 1
TransPort 9040
DNSPort 53


DataDirectory /home/bart/Desktop/tor-browser_en-US/Browser/TorBrowser/Data/Tor
GeoIPFile /home/bart/Desktop/tor-browser_en-US/Browser/TorBrowser/Data/Tor/geoip
GeoIPv6File /home/bart/Desktop/tor-browser_en-US/Browser/TorBrowser/Data/Tor/geoip6

Now, start-tor-browser -v gives the following result:

./start-tor-browser -v

(process:3177): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Nov 07 11:18:23.001 [notice] Tor v0.2.6.10 (git-cab52fe998909e08) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1p and Zlib 1.2.8.
Nov 07 11:18:23.001 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Nov 07 11:18:23.001 [notice] Read configuration file "/home/bart/Desktop/tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults".
Nov 07 11:18:23.001 [notice] Read configuration file "/home/bart/Desktop/tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc".
Nov 07 11:18:23.004 [notice] Opening Socks listener on 127.0.0.1:9150
Nov 07 11:18:23.004 [notice] Opening DNS listener on 127.0.0.1:53
Nov 07 11:18:23.004 [warn] Could not bind to 127.0.0.1:53: Permission denied
Nov 07 11:18:23.004 [notice] Opening Transparent pf/netfilter listener on 127.0.0.1:9040
Nov 07 11:18:23.004 [notice] Opening Control listener on 127.0.0.1:9151
Nov 07 11:18:23.004 [notice] Closing partially-constructed Socks listener on 127.0.0.1:9150
Nov 07 11:18:23.004 [notice] Closing partially-constructed Transparent pf/netfilter listener on 127.0.0.1:9040
Nov 07 11:18:23.004 [notice] Closing partially-constructed Control listener on 127.0.0.1:9151
Nov 07 11:18:23.004 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Nov 07 11:18:23.004 [err] Reading config failed--see warnings above.

Thanks!

6
  • What specifically are you adding to your torrc file? Just DNSPort 53, or some other lines as well (as specified on that page)? Can you edit your question to include a copy of your complete torrc? Nov 6, 2015 at 14:06
  • Hi Richard, I add the following 4 lines: VirtualAddrNetworkIPv4 10.192.0.0/10 AutomapHostsOnResolve 1 TransPort 9040 DNSPort 53. Initially I added all four of them at once, but the Tor browser was not able to launch. So I tried again, added them one by one and found out that it's just DNSPort 53 that causes the problem.
    – Bart
    Nov 7, 2015 at 9:54
  • Start Tor using start-tor-browser -v to give a full set of syslogs. Your error will probably be Could not bind to 127.0.0.1:53: Permission denied. That is the next place to start from :) Nov 7, 2015 at 11:11
  • Yup, [warn] Could not bind to 127.0.0.1:53: Permission denied - that's the problem. But when I try to run tor browser with root privileges (sudo...) it exits with another error 'The Tor Browser Bundle should not be run as root. Exiting'.
    – Bart
    Nov 7, 2015 at 11:23
  • I remember seeing other threads related to this, but can't remember the solution. (I can't immediately find the other threads.) Try Googling to see what you can dig up. Either that, or hopefully other members of the forum will have suggestions. Nov 7, 2015 at 16:52

1 Answer 1

1

On Linux based systems only root can bind ports between 0 and 1024. Thatswhy the operating system forbids you to use port 53 in this case. Here is a nice answer which explains this fact for a webserver: https://askubuntu.com/a/338239/236

In Ubuntu you might be better off to install Tor as a system daemon and make your changes. With this approach it is possible to set DNSPort 53 without any problems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .