What do I need to modify from the default squid.conf to make it work as a transparent proxy server? -


i have router dd-wrt , forwarding router seems work following script:

#!/bin/sh proxy_ip=192.168.77.77 proxy_port=3128 lan_ip=`nvram lan_ipaddr` lan_net=$lan_ip/`nvram lan_netmask`  iptables -t nat -a prerouting -i br0 -s $lan_net -d $lan_net -p tcp --dport 80 -j accept iptables -t nat -a prerouting -i br0 -s ! $proxy_ip -p tcp --dport 80 -j dnat --to $proxy_ip:$proxy_port iptables -t nat -i postrouting -o br0 -s $lan_net -d $proxy_ip -p tcp -j snat --to $lan_ip iptables -i forward -i br0 -o br0 -s $lan_net -d $proxy_ip -p tcp --dport $proxy_port -j accept 

now if run default squid.conf file, following page on web broweser:

error requested url not retrieved following error encountered while trying retrieve url: /questions/ask  invalid url 

as can see, 'stackoverflow.com' truncated url: stackoverflow.com/questions/ask

now if change append transparent following line:

http_port 3128 -> http_port 3128 transparent 

none of pages show in web browser , following error in '`/var/log/squid/cache.log':

 nf getsockopt(so_original_dst) failed on local=192.168.77.77:3128 remote=192.168.77.1:5268 fd 9 flags=33: (92) protocol not available 

is there anyway me make squid work? no reference on google.com seems help.

by default squid deny access. have specify allowed.

add acl list

acl mycomputer src <yourip> 

then add right before deny all

http_access allow mycomputer  # , deny other access proxy http_access deny 

before adding squid.conf, getting same or similar error.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -