Solved

Linux Squid Box

Posted on 2009-05-07
13
1,195 Views
Last Modified: 2013-12-16
Hi there,
I'm trying to get a squid box working...ive defined the commands on the cisco router and when i do show ip wccp web-cache detail command on router, it tells me that my squid is in NOT usable state ... Given below is my config file for squid ... am a new comer to linux but just trying to see why its not working.....any help would be appreciated ! If any other files you may need, please let me know ...
[root@cacheboy etc]# vi /usr/etc/squid.conf

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

http_access allow GG_network

http_access allow localhost

http_access deny all

http_reply_access allow all

icp_access allow all
 

### Dynamic Content

acl store_rewrite_list dstdomain .windowsupdate.com .youtube.com .googlevideo.com .video.google.com .video.google.com.au .llwnd.net

acl google_youtube_1 dst 74.125.0.0/16 72.14.255.0/24 208.117.253.64/26

acl google_youtube_2 urlpath_regex get_video\?video_id=

storeurl_access allow store_rewrite_list

storeurl_access allow google_youtube_1 google_youtube_2

storeurl_access deny all

storeurl_rewrite_program /usr/bin/store_url_rewrite

quick_abort_min -1 KB

cache allow store_rewrite_list

cache allow google_youtube_1 google_youtube_2

cache allow all
 

### URL Redirect Configuration

acl url_rewrite_list dstdomain .hostelworld.com .nomadsworld.com

redirect_access allow url_rewrite_list

redirect_program /usr/bin/url_rewrite /usr/etc/url_redirect.conf

redirect_children 5
 

### WCCP Implementation

wccp2_router 10.0.9.1

wccp_version 4

wccp2_rebuild_wait on

wccp2_forwarding_method 1

wccp2_return_method 1

wccp2_assignment_method 1

wccp2_service standard 0

wccp2_weight 10000

wccp2_address 10.0.9.11
 

### SNMP and Multicast testing

snmp_port 3401

acl GG-Webcache snmp_community GG-WEBCACHE

snmp_access allow GG-Webcache localhost

snmp_access deny all

icp_port 3130

log_icp_queries off

Open in new window

0
Comment
Question by:nabeel92
13 Comments
 
LVL 7

Expert Comment

by:dineesh
ID: 24325941
HI,

Can you post the squid log output..

regards
Dinesh
0
 

Author Comment

by:nabeel92
ID: 24325974
am a new comer to linux, u'll have to guide me step by step ... sorry for that ;)
I did
[root@cacheboy etc]# cd /var/log/squid/
[root@cacheboy squid]# ls
access.log    access.log.2  access.log.5  cache.log.0  cache.log.3  cache.log.6  store.log.1  store.log.4
access.log.0  access.log.3  access.log.6  cache.log.1  cache.log.4  store.log    store.log.2  store.log.5
access.log.1  access.log.4  cache.log     cache.log.2  cache.log.5  store.log.0  store.log.3  store.log.6

is there any other output you're looking for ?
Thanks,
0
 
LVL 19

Expert Comment

by:alextoft
ID: 24330083
tail -30 cache.log

...would be a good starting point.
0
 

Author Comment

by:nabeel92
ID: 24331858
[root@cacheboy squid]# tail -100 cache.log
2009/05/08 04:56:46| logfileOpen: opening log /usr/var/logs/netdb.state
2009/05/08 04:56:46| logfileClose: closing log /usr/var/logs/netdb.state
2009/05/08 04:56:46| NETDB state saved; 0 entries, 0 msec
2009/05/08 05:49:01| logfileOpen: opening log /usr/var/logs/netdb.state
2009/05/08 05:49:01| logfileClose: closing log /usr/var/logs/netdb.state
2009/05/08 05:49:01| NETDB state saved; 0 entries, 0 msec
2009/05/08 06:57:34| logfileOpen: opening log /usr/var/logs/netdb.state
2009/05/08 06:57:34| logfileClose: closing log /usr/var/logs/netdb.state
2009/05/08 06:57:34| NETDB state saved; 0 entries, 0 msec
2009/05/08 07:39:02| logfileOpen: opening log /usr/var/logs/netdb.state
2009/05/08 07:39:02| logfileClose: closing log /usr/var/logs/netdb.state
2009/05/08 07:39:02| NETDB state saved; 0 entries, 0 msec
2009/05/08 08:54:45| logfileOpen: opening log /usr/var/logs/netdb.state
2009/05/08 08:54:45| logfileClose: closing log /usr/var/logs/netdb.state
2009/05/08 08:54:45| NETDB state saved; 0 entries, 0 msec
2009/05/08 09:35:00| logfileOpen: opening log /usr/var/logs/netdb.state
2009/05/08 09:35:00| logfileClose: closing log /usr/var/logs/netdb.state
2009/05/08 09:35:00| NETDB state saved; 0 entries, 0 msec
2009/05/08 09:37:39| Reconfiguring Squid Cache (version CACHEBOY_1.6)...
2009/05/08 09:37:39| FD 37 Closing HTTP connection
2009/05/08 09:37:39| Closing Pinger socket on FD 16
2009/05/08 09:37:39| Pinger socket opened on FD 16
2009/05/08 09:37:39| FD 40 Closing WCCP socket
2009/05/08 09:37:39| FD 38 Closing ICP connection
2009/05/08 09:37:39| FD 39 Closing SNMP socket
2009/05/08 09:37:39| logfileClose: closing log /var/log/squid/store.log
2009/05/08 09:37:39| logfileClose: closing log /var/log/squid/access.log
2009/05/08 09:37:39| Including Configuration File: /usr/etc/squid.conf (depth 0)
2009/05/08 09:37:39| Cache COSS dir '/var/proxy/cache1/1' size remains unchanged at 16384000 KB
2009/05/08 09:37:39| WARNING: cannot change COSS memory bufs Squid is running
2009/05/08 09:37:39| Cache COSS dir '/var/proxy/cache1/2' size remains unchanged at 16384000 KB
2009/05/08 09:37:39| WARNING: cannot change COSS memory bufs Squid is running
2009/05/08 09:37:39| Cache COSS dir '/var/proxy/cache1/3' size remains unchanged at 16384000 KB
2009/05/08 09:37:39| WARNING: cannot change COSS memory bufs Squid is running
2009/05/08 09:37:39| Cache COSS dir '/var/proxy/cache1/4' size remains unchanged at 16384000 KB
2009/05/08 09:37:39| WARNING: cannot change COSS memory bufs Squid is running
2009/05/08 09:37:39| Cache dir '/var/proxy/cache2' size remains unchanged at 65536000 KB
2009/05/08 09:37:39| Cache dir '/var/proxy/cache3' size remains unchanged at 65536000 KB
2009/05/08 09:37:39| Cache dir '/var/proxy/cache4' size remains unchanged at 65536000 KB
2009/05/08 09:37:39| parseConfigFile: squid.conf:101 unrecognized: 'redirect_access'
2009/05/08 09:37:39| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/05/08 09:37:39| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/05/08 09:37:39| logfileOpen: opening log /var/log/squid/access.log
2009/05/08 09:37:39| logfileOpen: opening log /var/log/squid/store.log
2009/05/08 09:37:39| User-Agent logging is disabled.
2009/05/08 09:37:39| Adding nameserver 139.130.4.4 from squid.conf
2009/05/08 09:37:39| DNS Socket created at 0.0.0.0, port 43106, FD 8
2009/05/08 09:37:39| Adding nameserver 10.0.8.18 from squid.conf
2009/05/08 09:37:39| helperOpenServers: Starting 5 'url_rewrite' processes
2009/05/08 09:37:39| helperOpenServers: Starting 5 'store_url_rewrite' processes
2009/05/08 09:37:39| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 26.
2009/05/08 09:37:39| Accepting ICP messages at 0.0.0.0, port 3130, FD 28.
2009/05/08 09:37:39| Accepting SNMP messages on port 3401, FD 30.
2009/05/08 09:37:39| WCCP Disabled.
2009/05/08 09:37:39| Accepting WCCPv2 messages on port 2048, FD 31.
2009/05/08 09:37:39| Initialising all WCCPv2 lists
2009/05/08 09:37:39| Pinger socket opened on FD 33
2009/05/08 09:37:39| Loaded Icons.
2009/05/08 09:37:39| Ready to serve requests.
2009/05/08 09:40:10| Reconfiguring Squid Cache (version CACHEBOY_1.6)...
2009/05/08 09:40:10| FD 26 Closing HTTP connection
2009/05/08 09:40:10| Closing Pinger socket on FD 33
2009/05/08 09:40:10| Pinger socket opened on FD 26
2009/05/08 09:40:10| FD 31 Closing WCCP socket
2009/05/08 09:40:10| FD 28 Closing ICP connection
2009/05/08 09:40:10| FD 30 Closing SNMP socket
2009/05/08 09:40:10| logfileClose: closing log /var/log/squid/store.log
2009/05/08 09:40:10| logfileClose: closing log /var/log/squid/access.log
2009/05/08 09:40:10| Including Configuration File: /usr/etc/squid.conf (depth 0)
2009/05/08 09:40:10| Cache COSS dir '/var/proxy/cache1/1' size remains unchanged at 16384000 KB
2009/05/08 09:40:10| WARNING: cannot change COSS memory bufs Squid is running
2009/05/08 09:40:10| Cache COSS dir '/var/proxy/cache1/2' size remains unchanged at 16384000 KB
2009/05/08 09:40:10| WARNING: cannot change COSS memory bufs Squid is running
2009/05/08 09:40:10| Cache COSS dir '/var/proxy/cache1/3' size remains unchanged at 16384000 KB
2009/05/08 09:40:10| WARNING: cannot change COSS memory bufs Squid is running
2009/05/08 09:40:10| Cache COSS dir '/var/proxy/cache1/4' size remains unchanged at 16384000 KB
2009/05/08 09:40:10| WARNING: cannot change COSS memory bufs Squid is running
2009/05/08 09:40:10| Cache dir '/var/proxy/cache2' size remains unchanged at 65536000 KB
2009/05/08 09:40:10| Cache dir '/var/proxy/cache3' size remains unchanged at 65536000 KB
2009/05/08 09:40:10| Cache dir '/var/proxy/cache4' size remains unchanged at 65536000 KB
2009/05/08 09:40:10| parseConfigFile: squid.conf:101 unrecognized: 'redirect_access'
2009/05/08 09:40:10| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/05/08 09:40:10| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/05/08 09:40:10| logfileOpen: opening log /var/log/squid/access.log
2009/05/08 09:40:10| logfileOpen: opening log /var/log/squid/store.log
2009/05/08 09:40:10| User-Agent logging is disabled.
2009/05/08 09:40:10| Adding nameserver 139.130.4.4 from squid.conf
2009/05/08 09:40:10| DNS Socket created at 0.0.0.0, port 50987, FD 8
2009/05/08 09:40:10| Adding nameserver 10.0.8.18 from squid.conf
2009/05/08 09:40:10| helperOpenServers: Starting 5 'url_rewrite' processes
2009/05/08 09:40:10| helperOpenServers: Starting 5 'store_url_rewrite' processes
2009/05/08 09:40:10| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 28.
2009/05/08 09:40:10| Accepting ICP messages at 0.0.0.0, port 3130, FD 30.
2009/05/08 09:40:10| Accepting SNMP messages on port 3401, FD 31.
2009/05/08 09:40:10| WCCP Disabled.
2009/05/08 09:40:10| Accepting WCCPv2 messages on port 2048, FD 33.
2009/05/08 09:40:10| Initialising all WCCPv2 lists
2009/05/08 09:40:10| Pinger socket opened on FD 34
2009/05/08 09:40:10| Loaded Icons.
2009/05/08 09:40:10| Ready to serve requests.
0
 

Author Comment

by:nabeel92
ID: 24391957
any feedback on this ? squid is still not working with cisco router ? kindly let me know if any other logs are required ?
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:nabeel92
ID: 24470471
hello...any comments would be appreciated !
0
 
LVL 76

Expert Comment

by:arnold
ID: 24507873
You have defined your wccp_version as 4, yet you are also defining version 2 variables.
Can you check the logs on the ASA dealing with the WCCP negotiation.
I do not think you need to define a wccp2_router.
http://www.experts-exchange.com/Security/Software_Firewalls/Enterprise_Firewalls/Cisco_PIX_Firewall/Q_23061826.html
http://www.sublime.com.au/squid-wccp/

The missing part might be that your kernel does not support GRE tunnel/encapsulation which might be why the wccp is not getting established.
0
 

Author Comment

by:nabeel92
ID: 24507895
Ok, to get this working ..

1. Should I change from wccp_version 4 to wccp_version 2 ?
2. How can I check if GRE tunnel is supported on this box ?
3. I'm using it with a Cisco router, on the router I just have 2 commands which are required
    ip wccp version 2
    ip wccp web-cache redirect in

   Is that it ?

4. Secondly, which interface do I need to apply these commands on ? Inside LAN interface or Outside Internet interface ?
0
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
ID: 24509239
Inside Interface since this is where you defined the wccp2_router to which the squid box will send WCCP advertisements/notices.
The wccp versions should match.
Presumably you have setup the rules that depend on the wccp being establish to route all port 80 trough the wccp connection while at the same time permitting the squid box to pass.

run modprob -l | grep -i gre
This will get a listing of all your installed modules and only display modules matching the pattern gre.
You should have three.
ip_gre.ko, sch_gred.ko, and sch_ingress.ko.




0
 
LVL 19

Expert Comment

by:Redimido
ID: 24515075
my question: is the port tcp/2048 open in your linux box?

put here the output of
iptables -L -vn


0
 

Author Comment

by:nabeel92
ID: 24562382
actualy the gre module wasnt installed on the squid box ... as well as there are some other mistakes in the squid configuration file ... thanks for pointing out those mistakes as i can forward them to the relevant person now...thnx
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now