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 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!

1 Answer 1


I managed to find a solution to my problem, and this page helped me greatly. The solution to my problem was the following: I was trying to just use iptables to redirect the traffic, but indeed needed a transparent proxy between my iptables and JonDo. It worked after I took the following steps:

1.: My iptables, I modified to foward all traffic to port 4008

2.: I used transport_ev, had it listen on my Pi on port 4008, and forward everything to port 4001.

3.: On port 4001, my JonDo client was listing for incoming traffic and forwarding it to the mix cascades.

Hope this will help someone else with the same problem :-) Cheers!

  • I'd gladly give this a practical test to see how it works as a concept.
    – Overmind
    Sep 14, 2016 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.