LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-10-2010, 12:02 PM   #1
Herbivore
LQ Newbie
 
Registered: Mar 2008
Posts: 17

Rep: Reputation: 0
How to verify FF add-on is using Tor/Privoxy


Mint 8 (Ubuntu 9.10, Karmic Koala), FF 3.5.8 with noscript, betterprivacy, ghostery, torbutton

Complete newbie regarding wireshark or netactview but I was advised to try one of these to determine if a Firefox add-on was using Tor.

Any suggestions or assistance appreciated.
 
Old 03-10-2010, 12:28 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Basically you would use it to see when you requested a page if the request was going out through tor or if the request was going out to the website in general.

Last edited by rweaver; 03-10-2010 at 12:30 PM.
 
Old 03-10-2010, 06:06 PM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
What I do when using Tor is to configure my firewall so that only Tor is allowed to start outbound connections. That way I don't have doubts — if I'm not using Tor I simply won't be able to surf.
 
Old 03-10-2010, 07:45 PM   #4
Herbivore
LQ Newbie
 
Registered: Mar 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rweaver View Post
Basically you would use it to see when you requested a page if the request was going out through tor or if the request was going out to the website in general.
Yes, I understand that in general, but specifically, if it is possible to describe or give an example, what would the packet information look like when going out through Tor and not?

As is common with newbies, we sometime ask a question wanting a simple answer where really what is needed is for one to hit the textbooks, as it were. If this is the case, I respect that; just let me know. The manual for wireshark is frankly daunting! And I can not find any example specific to Tor. I have a feeling that if I want to use wireshark properly, I am going to have to go through some preliminary stages of learning first. I was kind of hoping this might be an exception and I could use wireshark without understanding the totality.
 
Old 03-10-2010, 07:51 PM   #5
Herbivore
LQ Newbie
 
Registered: Mar 2008
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by win32sux View Post
What I do when using Tor is to configure my firewall so that only Tor is allowed to start outbound connections. That way I don't have doubts — if I'm not using Tor I simply won't be able to surf.
This is an intriguing idea? And it sounds suited to my simple mind, but, not having used a firewall in ages (since Windows) and having had a look at the one bundled with Mint (Ubuntu), Gufw, I am going to need help to configure it to do as you suggest.

Are you familiar with Gufw or should I post specific questions for each option? Example: Use the new rule advanced tab? Choose allow TCP. What IP and port to put in the from and to fields? 127.0.0.1 8118 must be one of those. . .
 
Old 03-10-2010, 08:00 PM   #6
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by Herbivore View Post
This is an intriguing idea? And it sounds suited to my simple mind, but, not having used a firewall in ages (since Windows) and having had a look at the one bundled with Mint (Ubuntu), Gufw, I am going to need help to configure it to do as you suggest.

Are you familiar with Gufw or should I post specific questions for each option? Example: Use the new rule advanced tab? Choose allow TCP. What IP and port to put in the from and to fields? 127.0.0.1 8118 must be one of those. . .
Well, it depends on where exactly you have Tor and Privoxy running. If it's running on the same host you're using to surf, then all you need to do is find out what user Tor is running as, then tell your firewall to only allow that user to start outbound connections. No need to use any port numbers at all. For example, a command like this would take care of it:
Code:
iptables -I OUTPUT -o eth0 -m owner ! --uid-owner tor-user -j REJECT
It basically says that if a packet exiting through eth0 wasn't generated by a program running as the user Tor runs as (tor-user in this example) it should be sent to REJECT. You could slap a LOG rule there too if you wanted, in order to know exactly when you would have otherwise been leaking DNS and/or unintentionally doing stuff outside the Tor network. When you're done using Tor, execute the command again with a -D instead of an -I to delete the rule and you're back to normal.

Last edited by win32sux; 03-10-2010 at 08:08 PM.
 
1 members found this post helpful.
Old 03-11-2010, 03:45 PM   #7
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by Herbivore View Post
Yes, I understand that in general...snip...without understanding the totality.
In this case it's actually something really really easy to check with say tcpdump, simply verify if the connection is going directly to the website in question on port 80, if it's not and its connecting out to some random host on the net in a port range applicable to tor, it's using tor.

Wireshark, tcpdump, etc are all useful tools but sometimes it's easier to use them in a simple way than in complex way

Edit: Win32 brings up a very elegant solution that appeals to me personally since it will prevent accidents from happening if an app doesn't get restarted at boot up (well, excluding iptables of course.)

Last edited by rweaver; 03-11-2010 at 03:46 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tor / Privoxy problem! rameious Linux - Software 1 04-25-2008 08:22 AM
tor and privoxy phantom_cyph Linux - Software 4 10-30-2007 04:25 PM
Tor and privoxy gabsik Linux - Networking 1 12-26-2005 01:57 PM
Privoxy and tor z3nith Linux - Software 2 10-01-2005 09:31 PM
Tor & Privoxy esage Linux - Software 3 07-25-2005 10:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration