I am trying to run Tor on ports 443 and 80 not on the standed 9001 and 9030. I have manager to work out that I need to use iptables to redirect the ports to ones Tor can use so as not to run it as root. Trouble is I cannot figure out why the rules I have are not working.
This is what I have added so far on the machine running Tor...
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 9001
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 9030
I have also changed the torrc file settings to as follows...
ORPort 443 NoListen
ORPort 127.0.0.1:9001 NoAdvertise
DirPort 80 NoListen
DirPort 127.0.0.1:9030 NoAdvertise
Tor loads but it never but says the ports are not accecible from the outside. What am I doing wrong?
Iptables Rules For Tor On Alternative Ports
2 posts
• Page 1 of 1
Re: Iptables Rules For Tor On Alternative Ports
Hi Sudhesh,
Did you try to telnet to the ip of your tor to check if port is open ?
you need a second pc to run check from.
IF tor has IP : 192.168.11.11 then run on second pc cmd
telnet 192.168.11.11 443
if something is listeninig on port 443 you'll get a
Trying 192.168.11.11...
Connected to 192.168.11.11
Escape character is '^]'.
Connection closed by foreign host.
if port is not setup (listening) it will show
Trying 192.168.11.11....
then try on second port
telnet 192.168.11.11 80
Give this a try and see it works.. Think it is a general port troubleshooting.
Did you try to telnet to the ip of your tor to check if port is open ?
you need a second pc to run check from.
IF tor has IP : 192.168.11.11 then run on second pc cmd
telnet 192.168.11.11 443
if something is listeninig on port 443 you'll get a
Trying 192.168.11.11...
Connected to 192.168.11.11
Escape character is '^]'.
Connection closed by foreign host.
if port is not setup (listening) it will show
Trying 192.168.11.11....
then try on second port
telnet 192.168.11.11 80
Give this a try and see it works.. Think it is a general port troubleshooting.
- Emma Hickam
- Posts: 0
- Joined: Wed Jan 21, 2015 12:54 pm
2 posts
• Page 1 of 1