![]() |
Squid server internet access problem
I have configured squid server and it is working fine.I want that only specific ip addresses in my LAN should be able to access internet and for that i have given these entries in access control lists in squid.conf file:
acl all src 0.0.0.0/0.0.0.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/8 acl SSL_ports port 443 acl Safe_ports port 80 acl Safe_ports port 21 acl Safe_ports port 443 acl Safe_ports port 70 acl Safe_ports port 210 acl Safe_ports port 1025-65535 acl Safe_ports port 280 acl Safe_ports port 488 acl Safe_ports port 591 acl Safe_ports port 777 acl CONNECT method CONNECT acl QUERY urlpath_regex cgi-bin \? acl apache rep_header Server ^Apache acl our_networks src 192.168.0.181/255.255.255.0 192.168.0.182/255.255.255.0 and in http access i have given this http_access allow our_networks http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localhost http_access deny all In this i want that only 192.168.0.181 and .182 should be able to access internet but Now the problem is that all the IPs in the LAN like 192.168.0.20 are also able to access internet.What changes i need to do to allow access to specific IP addresses.I am not using any firewall or iptables entries and i am manually changing in the firefox at client side to access internet. |
I'm guessing when you define:
acl our_networks src 192.168.0.181/255.255.255.0 192.168.0.182/255.255.255.0 squid is interpreting 192.168.0.181/255.255.255.0 as a network, because that is what this definition is. Code:
jcwx@haley:~$ ipcalc 192.168.0.181/255.255.255.0Drop the netmask for single host definitions and see if that works. I haven't worked on squid in a few years, but as I recall, you don't need a netmask for single hosts. acl our_networks src 192.168.0.181 192.168.0.182 |
Thanks a lot...It worked for me.Now i will be very much grateful if any one can tell me how to use squid server with iptables.Right now i have to manually configure web browser at each client side to use squid as proxy server but i want that i dont have to change anything in client's web browser and it should automatically start.I think it can be done by using iptables but i dont know how to do it.
|
Quote:
|
| All times are GMT -5. The time now is 12:05 AM. |