Thanks for the quick response.
'ournetwork' is it a generic word which we can use straightaway ?
>iptables -t nat -A POSTROUTING -o eth0 -s <local-network_ip/255.255.2
"local-network_ip" you mean 192.168.0.20 (our local nic ip) ?
"ip of squid-box" its a dynamic ip being allotted every time ... which ip should be this ?
Main Topics
Browse All Topics





by: amitnepalPosted on 2009-11-02 at 23:36:03ID: 25726699
Hi,
er on
55.0> -d <ip of squid-box> -j MASQUERADE
This portion of your squid.conf file is for enabling transparent proxy configuration. Since you are looking for the iptables commands, you should be looking to have transparent proxy . So you are good with this config :
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_head
Then , near this line :
acl localhost src 127.0.0.1/255.255.255.255
put :
acl ournetwork src 192.168.0.0/255.255.255.0
( which means your internal network ) 192.168.0.1 to 192.168.0.254
Now
above this line : http_access allow manager localhost
put :
http_access allow ournetwork
Save the squid.conf file . Your squid configuration is done.
Now for the iptables :
iptables -t nat -A POSTROUTING -o eth0 -s <local-network_ip/255.255.2
then save iptables configuration
You should be good