LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-17-2023, 06:23 AM   #1
Jason.nix
Member
 
Registered: Feb 2023
Posts: 627

Rep: Reputation: 11
Post use Tor as a listening proxy server


Hello,
I want to setup Tor as a proxy server and a remote computer connect to my system and use Tor. I opened "/etc/tor/torrc" file and added the following lines to it:
Code:
SocksListenAddress (Server's internal IP address)
SocksPolicy accept *
SocksPort 0.0.0.0:9050
Then, restarted the Tor service:
Code:
● tor.service - Anonymizing overlay network for TCP (multi-instance-master)
   Loaded: loaded (/lib/systemd/system/tor.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2022-12-14 09:47:38 +0330; 5min ago
  Process: 9759 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 9759 (code=exited, status=0/SUCCESS)

Dec 14 09:47:38 Xen-aka-X3n systemd[1]: Starting Anonymizing overlay network for TCP (multi-instance-master)...
Dec 14 09:47:38 Xen-aka-X3n systemd[1]: Started Anonymizing overlay network for TCP (multi-instance-master).
After it, I opened port 9050 with the following command:
Code:
$ sudo iptables -A INPUT -p tcp --dport 9050 -j ACCEPT
My system iptables rules are:
Code:
Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  127.0.0.0/8          127.0.0.0/8         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere            
SYN_FLOOD  tcp  --  anywhere             anywhere             tcp flags:FIN,SYN,RST,ACK/SYN
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:9050

Chain FORWARD (policy DROP)
target     prot opt source               destination         
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            
ACCEPT     udp  --  anywhere             anywhere            
ACCEPT     icmp --  anywhere             anywhere            
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
ACCEPT     all  --  anywhere             anywhere            

Chain SYN_FLOOD (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere             limit: avg 5/sec burst 10
DROP       all  --  anywhere             anywhere
On the client, I set proxy in the Internet browser, but I got the following error:
Code:
The proxy server is refusing connections
Why? How to solve it?

Thank you.

Last edited by Jason.nix; 05-17-2023 at 06:30 AM.
 
Old 05-20-2023, 11:28 PM   #2
Jason.nix
Member
 
Registered: Feb 2023
Posts: 627

Original Poster
Rep: Reputation: 11
Hello,
No idea?


Thank you.
 
Old 05-23-2023, 09:32 PM   #3
jayjwa
Senior Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 1,030

Rep: Reputation: 391Reputation: 391Reputation: 391Reputation: 391
That's not how you use Tor. Tor is not a HTTP proxy. It's basically a chaining socks5 with encryption. You need something to pass HTTP traffic. Use Torbrowser, or set it up the old fashioned way by using a forwarding proxy chaining it to Tor (such as Privoxy). If you want to use the Tor network from another computer after that, then set Privoxy to allow connections for that other computer.

Also, the 3rd iptables rule on the INPUT chain effectively blocks every new connection that isn't made by your host.
Code:
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
Adding an ACCEPT later in the chain is useless as it is never reached.
 
Old 06-07-2023, 01:09 AM   #4
Jason.nix
Member
 
Registered: Feb 2023
Posts: 627

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by jayjwa View Post
That's not how you use Tor. Tor is not a HTTP proxy. It's basically a chaining socks5 with encryption. You need something to pass HTTP traffic. Use Torbrowser, or set it up the old fashioned way by using a forwarding proxy chaining it to Tor (such as Privoxy). If you want to use the Tor network from another computer after that, then set Privoxy to allow connections for that other computer.

Also, the 3rd iptables rule on the INPUT chain effectively blocks every new connection that isn't made by your host.
Code:
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
Adding an ACCEPT later in the chain is useless as it is never reached.
Hello,
Thank you so much for your reply.
The Tor is on a Linux box and a Windows client wants to connect to it.
 
Old 06-07-2023, 01:47 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,269

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
probably this? https://tor.stackexchange.com/questi...e-tor-as-proxy
 
Old 06-19-2023, 01:03 AM   #6
Jason.nix
Member
 
Registered: Feb 2023
Posts: 627

Original Poster
Rep: Reputation: 11
Hello,
Because of the many codes and etc., the LQ wouldn't let me to post my question here. I pasted my question here.
 
Old 07-14-2023, 02:08 PM   #7
Jason.nix
Member
 
Registered: Feb 2023
Posts: 627

Original Poster
Rep: Reputation: 11
Hello,
The problem was because I had closed the server ping.


Thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Why is it more secure to use Tor on Whonix, then just use tor elsewhere? PACMANchasingme Linux - Distributions 2 12-31-2015 05:53 AM
LXer: How To Set Up A TOR Middlebox Routing All VirtualBox Virtual Machine Traffic Over The TOR Netw LXer Syndicated Linux News 0 02-08-2012 11:30 AM
LXer: Tor Browser Bundle-Tor Goes Portable LXer Syndicated Linux News 1 09-02-2011 02:29 AM
TOR: traffic between my workstation TOR entry point really not encrypted..? john99 Incognito 3 11-11-2009 01:06 AM
TOR-there seems to be no tor.pkg- what now? me-$-on Slackware 5 06-06-2008 11:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:47 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