OpenWrt Forum Archive

Topic: iptables setting for privoxy

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Dear forum,

I have installed LEDE with a shadowsocks client and privoxy on my router (ACS1900v2). Using the proxy settings in Firefox works fine, I can access the censored websites in my country without any problem. However, I would like to skip entering the proxy settings in Firefox, so that all the clients connected to the router are automatically using privoxy to access the internet (e.g. for smartphones/tablets connected via wifi).

When I understood it right, I can achieve that using iptables. I have tried several iptable settings I found in this forum and in tutorials in the internet but nothing works and I fail to access blocked websites. Can you please help me using the correct setting?

Kind regards,
Aldaris

I'm doing this with:

/usr/sbin/iptables -t nat -A PREROUTING -i br-lan -p tcp --dport 80 -j REDIRECT --to-port 8118

You also have to tell privoxy to accept those redirected connections in /etc/config/privoxy:

option  accept_intercepted_requests     '1'

An easy test if you are actually reaching privoxy is entering "http://config.privoxy.org/" in your browser.

Thanks a lot, the Proxy is working.

However, only Port 80 is forwarded. How can I also forward DNS requests? I think these are the ones used to block websites as I am not able to access google & Co.

I don't think you can forward DNS request to privoxy. It is a web proxy, and not a dns server or dns proxy.

The discussion might have continued from here.