Install Tor on Fedora

This tutorial explains how to install Tor on a Fedora system. If you are looking for an easy to use solution check you this new all in one package here.

There is a Fedora package of Tor. We need to install 2 packages:

  • tor
  • privoxy

(if you don’t install tor via yum check if your version not was manipulated)

1. Install necessary packages:

yum install tor privoxy

2. Configure privoxy add this line to /etc/privoxy/config:

forward-socks4a / .

3. On Fedora 14 create SELinux rule

On Fedora 14 you need to create a own rule for SELinux.
Try to start tor with:

service tor start

This will fail if SELinux is up and running.
Now run the following commands to generate a rule for your needs:

grep tor /var/log/audit/audit.log | audit2allow -M mytor
semodule -i mytor.pp

4. Start privoxy and tor service

service tor start
service privoxy start

If you want to start tor automatically at boot time add theses two services to your default runlevel:

chkconfig --levels 35 tor on
chkconfig --levels 35 privoxy on

5. Install Firefox Addon Torbutton and activate Tor in Firefox


Now you should be able to surf via Tor. You can check this via (thanks to Brad for this comment).

6. Setup your tor as bridge (optional)

Please setup a Tor server or at least a Tor bridge to make Tor more powerful and safe for users in countries without free internet access.

If you want to run a tor bridge you only need to add this lines to your torrc file:

SocksPort 0
ORPort 443
BridgeRelay 1
Exitpolicy reject *:*

Now configure port forwarding in your router to the IP of your Computer with TCP port 443 to make it possible for your tor instance to act as bridge.

Click on the links for more information about what a bridge is and how you can run a public relay or server.

4 thoughts on “Install Tor on Fedora

  1. Urfaust

    For some reason this never works.

    1.) Whenever I try to start Tor (as seen in step 3), the Terminal spits this back at me:

    Starting /usr/bin/tor: [FAILED]

    2.) An SELinux Alert then pops up to tell me that “The source process: /usr/bin/tor Attempted this access: name_bind On this tcp_socket: port 443”

    How do you prevent these SELinux problems in Fedora 14 with Tor? No one has been able to give it to me straight just yet.

    P.S.: There is no support yet for FF4 for Tor either is there?

    1. Banym Post author

      I just tested it with enabled SELinux on my Fedora 13 machine and it works for me for browsing. If you want to run a tor bridge or server you need to allow tor to open a port with something linke this: semanage port -a -t tor_port_t -p tcp 443. I will update the tutorial for this case.
      Thanks for the hint.


    1. Banym Post author

      Now after the update of my workstation to Fedora 14 I had the same behavior. I updated the tutorial and you should be able to fix the problem with the commands shown under point three.




Leave a Reply

Your email address will not be published. Required fields are marked *