Iptables Rules For Tor On Alternative Ports
Posted: Tue Feb 17, 2015 12:05 pm
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?
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?