I'm currently trying to set up a Raspberry Pi as a wireless access point, and want to run JonDo on it. JonDo acts as a proxy that redirects my traffic through a cascade of mixes, in order to hide my ip. The free version supports only http/https whereas the premium version offers socks support additionally. I can use either.
So far, I have achieved the following: I can run JonDoConsole in daemon mode on the Pi, and when I switch my browsers proxy settings to the Pi ip and port 4001, I can surf via JonDo on the Pi.
My goal is to modify this in the following way: I want for my Pi to redirect all incoming traffic to port 4001 itself, so I don't have to switch browser settings. For this, I run JonDoConsole in daemon mode, listening on 127.0.0.1:4001. To redirect all incoming traffic, I'm trying to use iptables, with the following configuration:
sudo iptables -t nat -F
sudo iptables -F
# so I can still ssh onto the pi:
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 22 -d $PI_IP -j REDIRECT --to-ports 22
# will look into proper dns redirection as soon as the redirection of http/https traffic works:
sudo iptables -t nat -A PREROUTING -i wlan0 -p udp --dport 53 -j REDIRECT --to-ports 53
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --syn -j REDIRECT --to-ports 4001
Unfortunately, this doesn't work, apart from ssh'ing. All I get back from my browser is an "unable to connect". Could somebody point me in the right direction as to where my errors lie? Thank you very much in advance!