0

I am following this https://raspberrytips.com/raspberry-pi-firewall/ to setup iptables for squid proxy server.

iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 80 -j DNAT --to 192.168.42.1:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128 

This commands should send data to squid at por 3128 but squid receives no data. I know Squid is working fine, because it receives data if i setup the browser to user 192.168.42.1:3128 as proxy

Current version of iptables is 1.8.2

6
  • Are you testing from the pi itself?
    – Tom Yan
    Commented Oct 29, 2019 at 10:36
  • from outside, wlan0 Commented Oct 29, 2019 at 22:22
  • So are you seeing a squid generated error page? Have you configured squid to work as a transparent proxy? (i.e. add another http_port with the option intercept and DNAT/REDIRECT traffics to that port instead.)
    – Tom Yan
    Commented Oct 30, 2019 at 3:17
  • I am not following. I don't see squid generate a error page, Simply the information doesn't reach his port. I am trying to use as a transparent proxy, that's why i am using the PREROUTING iptable entrys above. Commented Oct 30, 2019 at 8:18
  • Perhaps you should update your question with iptables-save output and the content of your squid.conf. Maybe also the "information" you mentioned (a screenshot of the browser?).
    – Tom Yan
    Commented Oct 30, 2019 at 8:32

0

You must log in to answer this question.

Browse other questions tagged .