Mystry of ethernet not appearing in Ubuntu under VM after mac change :)

Mystry of ethernet not appearing in Ubuntu under VM after mac change

Filed under: Linux Related, VMware ESXi Related — Tags: ethernet not showing in ubuntu — Waseem Raaj / Pinochio~:) @ 8:41 AM
 
 
 
 
 
 
9 Votes

Ubuntu
Recently I was doing an remote installation of Ubuntu Server as a guest VM in ESXI 5.1 in INDIA/PUNE. It was OS requirement to change the default dynamic mac created by VM to some other fixed mac address because of an application requirement which was bind with the specific mac address. After changing mac address to required mac address e.g: 00:0h:c1:96:1c:98 via esxi client in guest vm networking properties , when I rebooted Ubuntu, the Ethernet adapter didn’t not appeared in the networking interfaces list.If i manualy try to bring up the interface by ifconfig eth0 up or ifconfig eth1 up , I receive following error.
SIOCSIFADDR: no such device
eth0: ERROR while getting interface flags: No such device
Bind socket to interface: no such device
Failed to bring up eth0
When I revert it to default (dynamic) it works ok.
After investigating deeply, it revealed that it occurred because if we clone a virtual machine , it creates a new MAC address for each network adapter. The guest operating system detects this is a new network adapter that has been inserted, but retains configuration for the previous network adapter (name and mac).
So here is how I fixed it.

Login to your Ubuntu server (which is installed under vm) with root access ,
Open the file /etc/udev/rules.d/70-persistent-net.rules in nano.

1
nano /etc/udev/rules.d/70-persistent-net.rules

You will see something like below . . . (After cloning of mac)
1
2
3
4
5
6
7
8
9
10
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
 
# PCI device 0x1022:0x2000 (pcnet32)  # Entry Ethernet adapter before cloning
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:11:3b:6a:8c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
 
# PCI device 0x1022:0x2000 (pcnet32)  # Entry Ethernet adapter after cloning
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0h:c1:96:1c:98", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
.
Now simply remove the first entry which is old interface entry with mac 00:0c:11:3b:6a:8c,
and in second entry which is eth1, change it to eth0
so after editing the file will look like following.
1
2
3
4
5
6
7
8
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# Syed Jahanzaib . aacable@hotmai.com . http://aacable.wordpress.com
 
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0h:c1:96:1c:98", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Save the file and and exit.
Now simply reboot the Ubuntu server, and then check your interface by
ifconfig
Hopefully it will appear in the list.
.

TIP: To avoid such issues, always change the mac address before OS installation :)~  / Zaib

.
Regard’s
Syed Jahanzaib

August 23, 2013

Lotus Notes wants to open some emails with browser, rather than within Notes itself !

Filed under: IBM Related — Tags: — Syed Jahanzaib / Pinochio~:) @ 4:27 PM
 
 
 
 
 
 
4 Votes

lotus
Today, One of our user faced problem that when he tried to open certain emails , it gives option to open it in my web browser, rather than within Notes itself. it showed all of the html formatting characters in the notes, rendering it almost unreadable. I applied fresh install of Notes but no use. The client was using Lotus notes 8.5.2
This is how I solved it.
Open Lotus Notes Client
Goto Files / Preferences
In the right window, click on ADDITION OPTIONS, Tick on DISABLE EMBEDDED BROWSER FOR MIME FORMAT
As showed in the example below , , ,
lotus-disable-embedded


Now restart Notes Client, and the problem solved :)

Regard’s
Syed Jahanzaib

Lotus Notes: Field: ‘tmpRepeatsText’: Array index out of bound while opening TO DO

Filed under: IBM Related — Tags: , , — Syed Jahanzaib / Pinochio~:) @ 4:15 PM
 
 
 
 
 
 
4 Votes

One of our Lotus notes users received following error while opening TO DO mail
Field: ‘tmpRepeatsText’: Array index out of bound
lotus-to-do-error

I fixed it by using
1
load convert mail\[maildatabase] * mail85.ntf

Regard’s
Syed Jahanzaib

Short References For Linux and Squid Proxy Server Management

 
 
 
 
 
 
13 Votes

♥♥♥   My Love Is For Ubuntu   ♥♥♥

By

♥♥♥   Syed Jahanzaib   ♥♥♥

.
LINUX RELATED: [UBUNTU]

How to configure / add IP address in UBUNTU via CLI / Command

Sometimes it is required to configure interface card by CLI (command line interface) , for example if you are doing any configuration on remote server via putty, and you want to configure another interface on that server, OR if you are using server edition of ubuntu which dont have GUI, then you will have to do it via CLI.
Configuring a static IP from the command line is a very short task. All you need to edit is one configuration file and restart the networking service.
All you need to know is the settings for your network.
I will show how to set a static IP of 192.168.2.2 on a network with a gateway and dns of 192.168.2.1
Open the configuration file in your favorite editor (mine is nano)
Open terminal and type the following command:
1
nano /etc/network/interfaces
.
Remove previous entries for your ethernet (for example eth0 section only)
.
Add a section as showed in the following example:
1
2
3
4
5
6
7
8
9
# Adding static ip for eth0 / Syed jahanzaib
auto eth0
iface eth0 inet static
address 192.168.2.2
netmask 255.255.255.0
network 192.168.2.0 # You can disable this line
broadcast 192.168.2.255 # You can disable this line
gateway 192.168.2.1 # You can disable this if you dont have any gateway - or if its a test lab rat :p
dns-nameservers 192.168.2.1
Save & Exit the file.
Now Restart the network service
1
/etc/init.d/networking restart
You can now verify your new ip by
1
ifconfig eth0
****************

HOWTO CHANGE MAC ADDRESS FROM CLI / Command

1
2
3
4
5
sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether 00:12:34:BL:AA:AH
sudo ifconfig eth0 up
# if apache is running, dont forget to restart it so it can take new mac, useful in some scenarios
# service apache2 restart
****************
.
.

To clear Linux Console History

1
history -c && history -w
First command clears the history, and the second writes the now (empty) history file.
.

To restart Networking , issue the following command.

To restart Networking services to apply changes you made with your interfaces , issue the following command.
1
2
/etc/init.d/networking stop
/etc/init.d/networking start
OR
1
/etc/init.d/networking restart
OR some other commands for the same
1
2
sudo initctl restart network-manager
sudo initctl restart network-interface INTERFACE=eth0
OR
1
2
sudo ifconfig eth0 down
sudo ifconfig eth0 up

 .

.
.

Howto to ADD / DELETE Route

Adding default Gateway
1
route add default gw 192.168.2.1 dev eth1
Add Route for Local Network using Gateway
1
route add -net 172.16.0.0 netmask 255.255.0.0 gw 192.168.2.1 dev eth0
Delete Route
1
route del -net 172.16.0.0 netmask 255.255.0.0 gw 192.168.2.1 dev eth0

.

.
.

Ubuntu / Debian Linux: Services Configuration Tool to Start / Stop System Services

1
apt-get install sysv-rc-conf
then run sysv-rc-conf

.

.

Howto disable ipv6 in ubuntu.  [12.4]

First edit sysctl.conf file in any editor , e.g:
nano /etc/sysctl.conf
and add following lines in the end
1
2
3
4
# IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
OR
use following to add them directly to file using echo command

1
2
3
echo >> /etc/sysctl.conf  net.ipv6.conf.all.disable_ipv6 = 1
 echo >> /etc/sysctl.conf net.ipv6.conf.default.disable_ipv6 = 1
 echo >> /etc/sysctl.conf net.ipv6.conf.lo.disable_ipv6 = 1

Save and Exit and execute following to activate changes :)

1
sysctl -p
.
.

HOWTO change default text EDITOR in CLI useful for Ubuntu 13 crontab)

1
export EDITOR="/usr/bin/nano"
.
.

HOWTO INSTALL WEBMIN ON YOUR UBUNTU BOX:

I assumed that you have installed and configure your Linux box (preferably Ubuntu, but any flavor can do the job, this is the main quality of Linux OS :) ~
To install Webmin , first add its repositories to sources.list, to do this first open sources.list
nano /etc/apt/sources.list
Now paste the following lines in the end of this file.
Save & Exit.
OR add them via echo command
1
2
3
echo >> /etc/apt/sources.list deb http://download.webmin.com/download/repository sarge contrib
echo >> /etc/apt/sources.list deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
echo >> /etc/apt/sources.list deb http://archive.canonical.com/ lucid partner
Save & Exit.
Now update apt-get and install webmin using
1
2
apt-get update
apt-get install webmin
It will take some time to install webmin depend on your internet connection (usually less then 10 minutes) , afterward you can access it using
(TIP: you can change the webmin port by editing in /etc/webmin/miniserv.conf and change the port number to any port you like, for example 443 or 1234)
.
.

IPTABLES Related:

To view IPTABLES rules, use following
1
2
iptables -L
iptables -t nat -L
==============================
To clear all iptables rules, use following
1
2
3
4
5
6
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
==============================
To Block Ip RANGE from accessing your linux box (in INPUT chain)
iptables -A INPUT -m iprange --src-range 1.2.3.4-5.6.7.8 -p tcp --dport 8080 -j DROP
To Block Single Ip from accessing your linux box (in INPUT chain)
iptables -A INPUT --src 1.2.3.4 -j DROP

To Block Single Ip from accessing SSH port 22 of your linux box (in INPUT chain)
iptables -A INPUT --src 1.2.3.4 -p tcp --dport 22 -j DROP
To Block all users from accessing SSH port 22 of your linux box (in INPUT chain)
iptables -A INPUT -p tcp --dport 22 -j DROP
DNAT port 80 request coming from LAN systems to squid 8080 ($SQUID_PORT) , This is to make your squid as transparent proxy
iptables -t nat -A PREROUTING -i LAN_Interface -p tcp --dport 80 -j DNAT --to SQUID_IP:PORT

==============================
.
.

To Delete single iptables rule via number or name

1
2
3
iptables -vnL –line-numbers
iptables -L INPUT –line-numbers
iptables -D INPUT 4
==============================

.

.

Using Putty from Shortcut to login to remote linux server without password [Jz]

To login to remote Linux server using PUTTY with out password, you can use public keys or quick way is to use shortcut trick. Not recommended if your system is not secure or used by other people,
For example:
C:\temp\putty.exe -ssh root@192.168.1.1 -pw yourpassword
TIP: Change the C:\temp to match your folder where putty.exe is available.
To login from Mikrotik to linux and Linux to Linux, read the below . . .
http://aacable.wordpress.com/2011/11/25/howto-login-on-remote-mikrotik-linux-without-password-to-execute-commands/
.
.

Bandwidth Monitoring tool for Ethernet Interface [Jz]

There are plenty of tools to do the task, I found bwm-ng the quickest :)
To install it on DEBIAN/UBUNTU , use
1
apt-get install bwm-ng
To install it on FEDORA / CENTOS, use
1
yum -y install bwm-ng
To run it , type
bwm-ng
Use following shortcut to tune bwm-ng
Press + to set time interval, default is set to 0.5 seconds which is too short, make it at least 1.00 or 1.1 to get mroe stable value.
Press u to get DATA in kb (kilobits), default is set to KB (Kilo Bytes)
To see data of eth0, with kilobits, and 1 second refresh rate , use following . . .
bwm-ng +I eth0 -u bits -t 1000

.

.
.

SQUID LOGS & Others[Jz]

To view SQUID access logs for all users, use
1
tail -f /var/log/squid/access.log
To view SQUID access logs for CACHE HIT
1
tail -f /var/log/squid/access.log |grep HIT
To view SQUID access logs for specific user ip, use
1
tail -f /var/log/squid/access.log |grep 192.168.1.20
To view SQUID process
1
2
ps aux |grep squid
ps aux |grep storeurl.pl # if you have url rewrite program configured like for youtube caching

Start SQUID in diagnostic mode (no daemon mode)
If you have some problems in your squid config and its not starting, then start squid in debug mode,
use following command
squid -d1N
it will start in no daemon mode and will show you details and errors if any.

BLOCK WEB SITES IN SQUID [HTTPS SUPPORT TOO]

Add in squid.conf and reload squid
1
2
3
4
5
6
acl fb dstdomain .facebook.com
http_access deny CONNECT fb all
acl badsites dstdomain .us.il.yimg.com .msg.yahoo.com .pager.yahoo.com
acl badsites dstdomain .rareedge.com .ytunnelpro.com .chat.yahoo.com
acl badsites dstdomain .voice.yahoo.com
http_access deny fb



Howto block User IP or series in SQUID ACL

If you want to block specific IP series in SQUID via ACL and want to redirect it to a local page (useful for non payment reminder) use following
1
2
3
4
5
6
7
8
#Allow Web Server access where our ad page is hosted , it can be local or remote whatever you like : p
acl allow_web_server dst 192.18.100.10
http_access allow allow_web_server
 
# Create ACL to block EXPIRED USERS pool and redirect it to advertisement page
acl expired_clients src 192.168.100.0/24
http_access deny expired_clients
.

SCRIPT TO CHECK SQUID or any other service STATUS AND START IT IF REQUIRED [Jz]

Following script [checksquid.sh] will check SQUID service status , and if it found squid stop, it will start it auto, if the squid is already running , it will do nothing :)
First create file in any folder or temp folder by
1
2
3
mkdir /temp
touch /temp/checksquid.sh
chmod +x  /temp/checksquid.sh
Now edit this file
1
nano /temp/checksquid.sh
& paste the following code
1
2
3
4
5
6
7
8
#!/bin/bash
pid=`pidof $1`
if [ "$pid" == "" ]; then
echo $1 service is NOT running, Trying to start again . . .
service $1 start
else
echo $1 service is Running OK , no further action required, EXITING  . . .
fi


.
Save & Exit.
Test it by running
1
/temp/checksquid.sh squid
You can check any service status with above command, if the service is not running , it will try to start with.
You can create its cron entry to run it after every 5 minutes.
For example, add it using CRON by following
1
crontab -e
and add following line
1
*/5 * * * * /temp/checksquid.sh

GENERAL LINUX COMMANDS [Jz]

To view Disk information
1
df -h
To view free memory
# in Megabytes
1
free -m
# in Gigabytes
1
free -g
To view Linux Release and architecture
1
lsb-release -a
You will something like below
root@server:~# lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.4
LTSRelease:        10.04
Codename:       lucid
To view Linux Architecture if its 32bit (x86) or 64bit
1
uname -a
root@server:~# uname -a
Linux server 2.6.32-50-server #112-Ubuntu SMP Tue Jul 9 20:45:08 UTC 2013 x86_64 GNU/Linux

x86_64 shows that the architecture is 64 bit

if you see something i386 , or i686 ,  it means you have 32 bit version.
.
To view CPU support
1
cat /proc/cpuinfo
and look for flag “lm” in the flags: column. If it’s there then it’s 64bit CPU.
.
.

TO EMPTY ANY FILE FROM COMMAND PROMPT

To empty any file contents, For example if you want to clear all the contents in the squid.conf file , so that you can start with new, use following
1
cat /dev/null /etc/squid/squid.conf
.

TO ADD ANY WORD IN STARTING OF EVERY LINE IN ANY FILE [Jz]

One way to do this is to use awk.
1
awk '{ printf "YOURTEXT"; print }'  CURRENT_FILENAME  > OUTPUT_FILENAME
If you want to modify the file in place, you can use sed with the -i switch.
1
sed -i -e 's_.*_YOURTEXT&_'  CURRENT_FILENAME
.
.

Adding PROXY for command line programs like WGET [Jz]


1
http_proxy="http://127.0.0.1:8080"
To test if SQUID service is not responding to requests, and restart ,
.

1
http_proxy="http://127.0.0.1:8080"<br />wget http://ya.ru -O /dev/null || squid -k reload

.

.
More to come . . .
.
.
Regard’s
Syed Jahanzaib

August 20, 2013

Monitor Switch Ports Up/Down Status via Mikrotik Dude – Short Notes

Filed under: Cisco Related, Mikrotik Related — Tags: , , — Syed Jahanzaib / Pinochio~:) @ 12:51 PM
 
 
 
 
 
 
9 Votes

3750
final
.
In my network, I have few Cisco switches at various departments connected via FIBER optics. Recently we were having issue of network connectivity in between various switches and devices. I already have a very good setup of Mikrotik base DUDE monitoring system, but it shows only the SWITCH availability status on the screen, I wanted to have a good visual for switch ports too.
I found few ways to accomplish this task using DUDE functions, scripts, etc, but found following method is very simple to start with . It also sends me email when any port goes Down or not in use.
Make sure your switch support SNMP , and SNMP agent is enabled at your SWITCH as well as at your DUDE to match the same. For simplicity you can use PUBLIC as a default community string in the switch. Also In this example I have used CISCO 3750 (in dual stack mode) and add only few ports just for example.
First add your switch in the map so that it can appear in the map as look like below.
As showed in the image below . . .
cisc-map.
.
.

Adding PROBE for port monitoring

Now to add PORTS monitoring, Open Dude,
Goto PROBES and click on + sign to add new probe.
Use the following data.
Name = PORT 9
Type = SNMP
SNMP Profile = Your SNMP Profile
Oid = iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.10109
Oid Type = integer
Comapre method = ==equal
Integer Value = 1
As showed in the image below . . .
adding-probe-in-probes
Note: Change the OID number to match the port number on your switch , for example I am monitoring port number9 which value is 10109 . You can use SNMPWALK via DUDE to check the OID’s for different ports of your switch.
Now click OK to save
.
.

Adding Switch PORT separately using IP and PROBE

Its time to add PORTs in your map so they can appear separately as showed in the title image
Go back to your MAP,
Right click and ADD new device,
Type your switch IP address, and click on Next,
Now DO NOT  click on Discover , simply click on + sign
In PROBE, Select the PORT 9 probe you created earlier
and click on Apply/OK
As showed in the image below . . .
port9
Click on Finish.
.
.
Now you will see something like below . . .
port-down-status
As you can see the port number 9 is down , so the status is shown correctly.
.
.
Now you can repeat the same procedure to add as much ports you like to monitor.
Something like below image . . .
something
.
.
.

Adding LINKS to monitor port usage

You can also add LINKS to show the port usage :)
As showed in the example below . . .
add link


linkx-snmp
.
.
.
After adding ports / snmp links, and other enhancements , you can see something like below image . .
.
final.
.
.
I will add more methods to monitor the ports. For more info , please read more at following links
.
.
.
Regard’s
Syed Jahanzaib

August 16, 2013

ZPH with SQUID 3.1.19 with UBUNTU 12.04 / Mikrotik QUEUE

Filed under: Linux Related — Tags: , , , — Syed Jahanzaib / Pinochio~:) @ 4:31 PM
 
 
 
 
 
 
11 Votes

zph in action :)

zph
.
zph-squid3

ZPH is a squid patch that enables SQUID to mark cached packets , so that it can later used by the Mikrotik or squid itself to bypass cached contents from Speed Package.
Z.P.H directives config which works with SQUID 2.7 donot work with new version of SQUID i.e 3.x
Use the following directives in /etc/squid3/squid.conf
1
2
# ZPH for Squid3 / zaib
qos_flows local-hit=0x30
and in Mikrotik, settings remain same to mark cache contents coming from the squid and bypass it using Queue Tree . . .
For Mikrotik 5.x
1
2
/ip firewall mangle add action=mark-packet chain=prerouting comment="MARK_CACHE_HIT_FROM_PROXY_ZAIB" disabled=no dscp=12 new-packet-mark=proxy passthrough=no
/queue tree add burst-limit=0 burst-threshold=0 burst-time=0s comment="Queue for SQUID CACHE HIT for ZPH / zaib" disabled=no limit-at=0 max-limit=0 name=Proxy packet-mark=proxy parent=global-out priority=1 queue=default
For Mikrotik 6.x
1
2
3
4
5
6
7
8
/ip firewall mangle add action=mark-packet chain=prerouting comment="MARK_CACHE_HIT_FROM_PROXY_ZAIB" disabled=no dscp=12 new-packet-mark=proxy passthrough=no
/queue tree add comment="ZPH Cache Hit Queue : ) / Syed Jahanzaib" name=proxy packet-mark=zph-hit parent=global priority=1 queue=default
#
#
# If above queue tree donot work with ROS 6.x then try adding simple queue and move it on TOP in simple QUEUE section
#
/queue simple
add max-limit=100M/100M name="ZPH-Proxy Cache Hit Simple Queue / Syed Jahanzaib >aacable@hotmail.com" packet-marks=zph-hit priority=1/1 target="" total-priority=1
.
.

Regard’s
SYED JAHANZAIB

August 13, 2013

VIDEOCACHE and SQUID Configuration [Short Notes]

Filed under: Linux Related — Tags: , , , — Syed Jahanzaib / Pinochio~:) @ 9:13 AM
 
 
 
 
 
 
13 Votes

videocache-header-logo
WAN utilization / 60mb
WAN utilization @ 60 mbps / zaib
First of all , intro to what VIDEOCACHE is ?
” Videocache is a Squid URL plugin to cache videos from famous video sharing portals/websites like Youtube, Metacafe etc. It helps you save bandwidth when a particular video is requested more than once from the same network/machine.
Squid can not cache the videos served dynamically. Videocache fits into squid to help it cache the videos as well. The cached videos are stored on your proxy server’s local storage or on a storage server in your network. These cached videos can be served to your clients at a very fast speed saving your upstream bandwidth. “
Following are some working configuration samples for VIDEOCACHE with SQUID on UBUNTU. Installation of VC is fairly simple as mentioned here step by step
http://cachevideos.com/documentation/
I am not showing howto install VIDEOCACHE plugin as its very simple and briefly described at the author site, I am only posting the working configuration files. Also note that videocache is a paid plugin, which costs around 400$ per year.
If you are looking for something free, you may try the following NIGNX method.
http://aacable.wordpress.com/2012/08/13/youtube-caching-with-squid-nginx/
Also I would like to share that for VIDEOCACHE plugin, you *MUST* have some good hardware with *LOTS OF* memory and STORAGE. Just for an idea, I deployed it at a network of 300 Users which had Dual CPU with multi cores server for proxy  , 128GB RAM, and 24 TB of external HP Storage, CPU was not much utilized, but at full peak time, the memory usage was around 95%, and the storage usage was around 180 GB in just 1 day.
Also you should have some good amount of bandwidth, otherwise videocache will become bottleneck for your network :) , OR schedule VIDEOCACHE to cache only in specific timings, its supported in /etc/videocache.conf
Following is an working Squid 2.7 on Ubuntu Server 10.4 with videocache support. Please modify necessary directives before using , for example cache_mem, hostname, ACL, Ip’s. Also make sure the CACHE_DIR have been changed to match your local directory structure with proper permissions assgined to user proxy or squid , depend on he nix flavor you are using
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# SQUID 2.7 CONFIG FILE WITH VIDEOCACHE PLUGIN FOR SQUID/VIDEOS [ Zaib]
 
# SQUID 2.7 WORKING CONFIG FILE [August 2013] with Videocache Support
# By - Syed Jahanzaib
# Email: aacable@hotmail.com
 
cache_store_log /var/log/squid/store.log
acl this_machine src 127.0.0.1 192.168.100.1
http_access allow this_machine
 
# --BEGIN-- videocache config for squid
url_rewrite_program /usr/bin/python /usr/share/videocache/videocache.py
url_rewrite_children 20
 
acl vc_deny_url url_regex -i \.blip\.tv\/(.*)filename \.hardsextube\.com\/videothumbs \.xtube\.com\/(.*)(Thumb|videowall)
 
acl vc_url url_regex -i \/youku\/[0-9A-Z]+\/[0-9A-Z\-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg)
acl vc_url url_regex -i \/(.*)key=[a-z0-9]+(.*)\.flv
acl vc_url url_regex -i \.(youtube|youtube-nocookie)\.com\/feeds\/api\/videos\/[0-9a-zA-Z_-]{11}\/
acl vc_url url_regex -i \.(youtube|youtube-nocookie)\.com\/(videoplayback|get_video|watch|watch_popup|user_watch)\?
acl vc_url url_regex -i \.(youtube|youtube-nocookie)\.com\/(v|e|embed)\/[0-9a-zA-Z_-]{11}
 
acl vc_dom_r dstdom_regex -i msn\..*\.(com|net)
acl vc_dom_r dstdom_regex -i msnbc\..*\.(com|net)
acl vc_dom_r dstdom_regex -i video\..*\.fbcdn\.net
acl vc_dom_r dstdom_regex -i myspacecdn\..*\.footprint\.net
 
acl vc_dom dstdomain .stream.aol.com .videos.5min.com msn.com .blip.tv .vid.ec.dmcdn.net .break.com .vimeocdn.com
acl vc_dom dstdomain .cdn.turner.com .dailymotion.com .c.wrzuta.pl .v.imwx.com .mccont.com .myspacecdn.com
acl vc_dom dstdomain .hardsextube.com .public.extremetube.phncdn.com .redtubefiles.com .video.pornhub.phncdn.com
acl vc_dom dstdomain .public.keezmovies.com .public.keezmovies.phncdn.com .slutload-media.com .public.spankwire.com .xtube.com
acl vc_dom dstdomain .public.youporn.phncdn.com .xvideos.com .tube8.com .public.spankwire.phncdn.com .pornhub.com
 
refresh_pattern \.youtube\.com\/videoplayback\? 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern stream\.aol\.com\/(.*)/[a-zA-Z0-9]+\/(.*)\.(flv|mp4) 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern videos\.5min\.com\/(.*)/[0-9_]+\.(mp4|flv) 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern proxy[a-z0-9\-]?[a-z0-9]?[a-z0-9]?[a-z0-9]?\.dailymotion\.com\/(.*)\.(flv|on2|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern vid\.akm\.dailymotion\.com\/(.*)\.(flv|on2|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern vid\.ec\.dmcdn\.net\/(.*)\.(flv|on2|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern video\.(.*)\.fbcdn\.net\/(.*)/[0-9_]+\.(mp4|flv|avi|mkv|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern (.*)\.myspacecdn\.com\/(.*)\/[a-zA-Z0-9]+\/vid\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern (.*)\.myspacecdn\.(.*)\.footprint\.net\/(.*)\/[a-zA-Z0-9]+\/vid\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern c\.wrzuta\.pl\/wv[0-9]+\/[a-z0-9]+/[0-9]+/ 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern c\.wrzuta\.pl\/wa[0-9]+\/[a-z0-9]+ 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
refresh_pattern vs[a-z0-9]?[a-z0-9]?[a-z0-9]?\.hardsextube\.com\/(.*)\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache override-expire override-lastmod ignore-private
 
acl vc_deny_url url_regex -i crossdomain.xml
acl vc_method method GET
acl vc_header req_header X-Requested-With -i videocache
url_rewrite_access deny !vc_method
url_rewrite_access deny vc_header
url_rewrite_access deny vc_deny_url
url_rewrite_access allow vc_dom
url_rewrite_access allow vc_url
url_rewrite_access allow vc_dom_r
redirector_bypass on
 
#These lines are needed.
acl this_machine src 127.0.0.1
http_access allow this_machine
strip_query_terms off
maximum_object_size 1000 MB
 
# --END-- videocache config for squid
 
# PORT and Transparent Option
http_port 8080 transparent
store_dir_select_algorithm round-robin
 
# Cache folders, change them according to your need, its an example of 500 GB
cache_dir aufs /cache1 512000 16 256
 
memory_replacement_policy heap LFUDA
cache_replacement_policy heap GDSF
 
# If you want to enable DATE time n SQUID Logs,use following
emulate_httpd_log on
logformat squid %tl %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
log_fqdn off
 
# How much days to keep users access web logs
# You need to rotate your log files with a cron job. For example:
# 0 0 * * * /usr/local/squid/bin/squid -k rotate
logfile_rotate 14
debug_options ALL,1
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache_log.log
cache_store_log /var/log/squid/store.log
 
# Block Ads [zaib]
#acl adsites dstdomain url_regex "/etc/squid/adslist.txt"
#http_access deny adsites
#deny_info http://192.168.6.1/psb.htm adsites
 
#I used DNSAMSQ service for fast dns resolving
#so install by using "apt-get install dnsmasq" first
dns_nameservers 127.0.0.1 8.8.8.8
ftp_user anonymous@
ftp_list_width 32
ftp_passive on
ftp_sanitycheck on
 
#ACL Section mylan myacl
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 563 # https, snews
#acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager all
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow all
#http_access allow all2
http_reply_access allow all
#http_reply_access allow all2
icp_access allow all
 
#==========================
# Administrative Parameters
#==========================
 
#============================================================$
# SNMP , if you want to generate graphs for SQUID via MRTG / zaib
#============================================================$
acl snmppublic snmp_community zaib
snmp_port 3401
snmp_access allow snmppublic all
snmp_access allow all
 
# I used UBUNTU so user is proxy, in FEDORA you may use use squid
cache_effective_user proxy
cache_effective_group proxy
cache_mgr SYED_JAHAN_ZAIB
visible_hostname aacable.wordpress.com
unique_hostname aacable@hotmail.com
 
# Memory , If you have 4 GB of RAM in the server, then use 1 GB
cache_mem 1 GB
minimum_object_size 0 bytes
maximum_object_size_in_memory 1024 KB
 
# ZPH , to mark content which is in CACHE
tcp_outgoing_tos 0x30 all
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136
acl store_rewrite_list urlpath_regex \/(get_video|videoplayback\?id|videoplayback.*id)
acl store_rewrite_list urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar)\?
acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
acl store_rewrite_list_domain url_regex (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
acl store_rewrite_list_path urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|avc|zip|mp3|3gp|rar|on2|mar|exe)$
acl store_rewrite_list_domain_CDN url_regex \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*) \.doubleclick\.net.*
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$ quantserve\.com
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[a-z]+[0-9]\.google\.co(m|\.id)
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(rar|zip|flv|wm(a|v)|3gp|mp(4|3)|exe|msi|avi|(mp(e?g|a|e|1|2|3|4))|cab|exe)
acl dontrewrite url_regex redbot\.org \.php
acl getmethod method GET
##
refresh_pattern -i \.htm 120 50% 10080 reload-into-ims
refresh_pattern -i \.html 120 50% 10080 reload-into-ims
refresh_pattern ^http://*.facebook.com/* 720 100% 4320
refresh_pattern ^http://mail.yahoo.com/.* 720 100% 4320
refresh_pattern ^http://*.yahoo.*/.* 720 100% 4320
refresh_pattern ^http://*.yimg.*/.* 720 100% 4320
refresh_pattern ^http://*.gmail.*/.* 720 100% 4320
refresh_pattern ^http://*.google.*/.* 720 100% 4320
refresh_pattern ^http://*.kaskus.*/.* 720 100% 4320
refresh_pattern ^http://*.googlesyndication.*/.* 720 100% 4320
refresh_pattern ^http://*.plasa.*/.* 720 100% 4320
refresh_pattern ^http://*.telkom.*/.* 720 100% 4320
##
 
# 1 year = 525600 mins, 1 month = 43800 mins
refresh_pattern imeem.*\.flv  0 0% 0     override-lastmod override-expire
refresh_pattern \.rapidshare.*\/[0-9]*\/.*\/[^\/]*   161280    90%    161280 ignore-reload
 
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?)    10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern (get_video\?|videoplayback\?id|videoplayback.*id|videodownload\?|\.flv?)    10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
#refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id||videodownload\?|\.flv?)       10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern \.(ico|video-stats) 10800 80% 10800    override-expire ignore-reload ignore-no-cache  ignore-private ignore-auth override-lastmod
refresh_pattern \.etology\?                       10800 80% 10800    override-expire ignore-reload ignore-no-cache
refresh_pattern galleries\.video(\?|sz)               10800 80% 10800    override-expire ignore-reload ignore-no-cache
refresh_pattern brazzers\?                       10800 80% 10800    override-expire ignore-reload ignore-no-cache
refresh_pattern \.adtology\?                      10800 80% 10800    override-expire ignore-reload ignore-no-cache
#refresh_pattern ^.*(utm\.gif|ads\?|rmxads\.com|ad\.z5x\.net|bh\.contextweb\.com|bstats\.adbrite\.com|a1\.interclick\.com|ad\.trafficmp\.com|ads\.cubics\.com|ad\.xtendmedia\.com|\.googlesyndication\.com|advertising\.com|yieldmanager|game-advertising\.com|pixel\.quantserve\.com|adperium\.com|doubleclick\.net|adserving\.cpxinteractive\.com|syndication\.com|media.fastclick.net).* 10800 20% 10800 ignore-no-cache  ignore-private override-expire ignore-reload ignore-auth   negative-ttl=40320 max-stale=10
refresh_pattern ^.*safebrowsing.*google  10800 80% 10800 override-expire ignore-reload ignore-no-cache ignore-private ignore-auth
refresh_pattern ^http://((cbk|mt|khm|mlt)[0-9]?)\.google\.co(m|\.uk) 10800 80% 10800 override-expire ignore-reload   ignore-private
refresh_pattern ytimg\.com.*\.jpg                   10800 80% 10800    override-expire ignore-reload
refresh_pattern images\.friendster\.com.*\.(png|gif)           10800 80% 10800    override-expire ignore-reload
refresh_pattern garena\.com                                   10800 80% 10800     override-expire reload-into-ims
refresh_pattern photobucket.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png)  10800 80% 10800     override-expire ignore-reload
refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\?           10800 80% 10800 ignore-no-cache override-expire override-lastmod
refresh_pattern mediafire.com\/images.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png)    10800 80% 10800 reload-into-ims override-expire ignore-private
refresh_pattern ^http:\/\/images|pics|thumbs[0-9]\.      10800 80% 10800 reload-into-ims ignore-no-cache  ignore-reload override-expire
refresh_pattern ^http:\/\/www.onemanga.com.*\/           10800 80% 10800 reload-into-ims ignore-no-cache  ignore-reload override-expire
 
# ANTI VIRUS
refresh_pattern guru.avg.com/.*\.(bin)                      10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern (avgate|avira).*(idx|gz)$                           10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern kaspersky.*\.avc$                                   10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern kaspersky                                           10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern update.nai.com/.*\.(gem|zip|mcs)                    10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern ^http:\/\/liveupdate.symantecliveupdate.com.*\(zip)     10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
 
refresh_pattern windowsupdate.com/.*\.(cab|exe)             10800  80%  10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern update.microsoft.com/.*\.(cab|exe)             10800  80%  10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe)             10800  80%  10800 ignore-no-cache  ignore-reload  reload-into-ims
 
#images facebook
refresh_pattern ((facebook.com)|(85.131.151.39)).*\.(jpg|png|gif)      10800 80% 10800 ignore-reload  override-expire ignore-no-cache
refresh_pattern -i \.fbcdn.net.*\.(jpg|gif|png|swf|mp3)                  10800 80% 10800 ignore-reload  override-expire ignore-no-cache
refresh_pattern  static\.ak\.fbcdn\.net*\.(jpg|gif|png)                  10800 80% 10800 ignore-reload  override-expire ignore-no-cache
refresh_pattern ^http:\/\/profile\.ak\.fbcdn.net*\.(jpg|gif|png)      10800 80% 10800 ignore-reload  override-expire ignore-no-cache
 
#banner IIX
refresh_pattern ^http:\/\/openx.*\.(jp(e?g|e|2)|gif|pn[pg]|swf|ico|css|tiff?) 10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/ads(1|2|3).kompas.com.*\/           10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/img.ads.kompas.com.*\/           10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern .kompasimages.com.*\.(jpg|gif|png|swf)       10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/openx.kompas.com.*\/           10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern kaskus.\us.*\.(jp(e?g|e|2)|gif|png|swf)        10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/img.kaskus.us.*\.(jpg|gif|png|swf)       10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
 
#IIX DOWNLOAD
refresh_pattern ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(mp3|rar|zip|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache    ignore-auth
 
#All File
refresh_pattern -i \.(3gp|7z|ace|asx|avi|bin|cab|dat|deb|divx|dvr-ms)      10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(rar|jar|gz|tgz|bz2|iso|m1v|m2(v|p)|mo(d|v))          10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|css|js)     10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(mp(e?g|a|e|1|2|3|4)|mk(a|v)|ms(i|u|p)|og(x|v|a|g)|rar|rm|r(a|p)m|snd|vob|wav) 10800 80% 10800 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(pp(s|t)|wax|wm(a|v)|wmx|wpl|zip|cb(r|z|t))     10800 80% 10800 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims
 
#########################################################################
 
refresh_pattern (cgi-bin|\?)       0      0%      0
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern ^ftp:         10080     95%     10800 override-lastmod reload-into-ims
refresh_pattern         .     180     95% 10800 override-lastmod reload-into-ims
 
global_internal_static off
retry_on_error on
buffered_logs on
read_ahead_gap 32 KB
 
#header_access Accept-Encoding deny  all
client_persistent_connections off
server_persistent_connections on
half_closed_clients off
strip_query_terms off
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100
vary_ignore_expire on
reload_into_ims on
pipeline_prefetch on
read_timeout 30 minute
client_lifetime 6 hour
positive_dns_ttl 6 hour
pconn_timeout 15 second
request_timeout 1 minute
log_icp_queries off
ipcache_size 16384
ipcache_low 98
ipcache_high 99
log_fqdn off
fqdncache_size 16384
memory_pools off
forwarded_for on
client_db off
max_filedescriptors 8192


if you are using SQUID 3.1.19 (Ubuntu 12.4 default isntallation) then use following, pretty much same hmmm :)

SQUID 3.1.19 CONFIG FILE in /etc/squid3/squid.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# SQUID 3.1.19 CONFIG FILE WITH VIDEOCACHE PLUGIN FOR SQUID/VIDEOS [ Zaib]
# SQUID 3.1.19 WORKING CONFIG FILE [August 2013] with Videocache Support
# By - Syed Jahanzaib
# Email: aacable@hotmail.com
 
cache_store_log /var/log/squid3/store.log
acl this_machine src 127.0.0.1 192.168.100.1 # Change this ip to match your's
http_access allow this_machine
 
# --BEGIN-- videocache config for squid
#
# PASTE THIS FILE AT THE TOP OF YOUR SQUID CONFIGURATION FILE
#
# (C) Copyright White Magnet Software Private Limited
# Company Website : http://whitemagnet.com/
# Product Website : http://cachevideos.com/
#
# Videocache Version : Trial
#
# This configuration is for Squid versions 3.x ZABBO
url_rewrite_program /usr/bin/python /usr/share/videocache/videocache.py
url_rewrite_children 20
 
acl vc_deny_url url_regex -i \.blip\.tv\/(.*)filename \.hardsextube\.com\/videothumbs \.xtube\.com\/(.*)(Thumb|videowall)
 
acl vc_url url_regex -i \/youku\/[0-9A-Z]+\/[0-9A-Z\-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg)
acl vc_url url_regex -i \/(.*)key=[a-z0-9]+(.*)\.flv
acl vc_url url_regex -i \.(youtube|youtube-nocookie)\.com\/feeds\/api\/videos\/[0-9a-zA-Z_-]{11}\/
acl vc_url url_regex -i \.(youtube|youtube-nocookie)\.com\/(videoplayback|get_video|watch|watch_popup|user_watch)\?
acl vc_url url_regex -i \.(youtube|youtube-nocookie)\.com\/(v|e|embed)\/[0-9a-zA-Z_-]{11}
 
acl vc_dom_r dstdom_regex -i msn\..*\.(com|net)
acl vc_dom_r dstdom_regex -i msnbc\..*\.(com|net)
acl vc_dom_r dstdom_regex -i video\..*\.fbcdn\.net
acl vc_dom_r dstdom_regex -i myspacecdn\..*\.footprint\.net
 
acl vc_dom dstdomain .stream.aol.com .videos.5min.com msn.com .blip.tv .vid.ec.dmcdn.net .break.com .vimeocdn.com
acl vc_dom dstdomain .cdn.turner.com .dailymotion.com .c.wrzuta.pl .v.imwx.com .mccont.com .myspacecdn.com
acl vc_dom dstdomain .hardsextube.com .public.extremetube.phncdn.com .redtubefiles.com .video.pornhub.phncdn.com
acl vc_dom dstdomain .public.keezmovies.com .public.keezmovies.phncdn.com .slutload-media.com .public.spankwire.com .xtube.com
acl vc_dom dstdomain .public.youporn.phncdn.com .xvideos.com .tube8.com .public.spankwire.phncdn.com .pornhub.com
 
refresh_pattern \.youtube\.com\/videoplayback\? 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern stream\.aol\.com\/(.*)/[a-zA-Z0-9]+\/(.*)\.(flv|mp4) 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern videos\.5min\.com\/(.*)/[0-9_]+\.(mp4|flv) 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern proxy[a-z0-9\-]?[a-z0-9]?[a-z0-9]?[a-z0-9]?\.dailymotion\.com\/(.*)\.(flv|on2|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern vid\.akm\.dailymotion\.com\/(.*)\.(flv|on2|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern vid\.ec\.dmcdn\.net\/(.*)\.(flv|on2|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern video\.(.*)\.fbcdn\.net\/(.*)/[0-9_]+\.(mp4|flv|avi|mkv|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern (.*)\.myspacecdn\.com\/(.*)\/[a-zA-Z0-9]+\/vid\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern (.*)\.myspacecdn\.(.*)\.footprint\.net\/(.*)\/[a-zA-Z0-9]+\/vid\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern c\.wrzuta\.pl\/wv[0-9]+\/[a-z0-9]+/[0-9]+/ 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern c\.wrzuta\.pl\/wa[0-9]+\/[a-z0-9]+ 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
refresh_pattern vs[a-z0-9]?[a-z0-9]?[a-z0-9]?\.hardsextube\.com\/(.*)\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) 120    80%    180 ignore-no-cache ignore-no-store override-expire override-lastmod ignore-private
 
acl vc_deny_url url_regex -i crossdomain.xml
acl vc_method method GET
acl vc_header req_header X-Requested-With -i videocache
url_rewrite_access deny !vc_method
url_rewrite_access deny vc_header
url_rewrite_access deny vc_deny_url
url_rewrite_access allow vc_dom
url_rewrite_access allow vc_url
url_rewrite_access allow vc_dom_r
url_rewrite_bypass on
#These lines are needed.
acl this_machine src 127.0.0.1
http_access allow this_machine
strip_query_terms off
maximum_object_size 10 GB
# --END-- videocache config for squid
 
# SQUID 3.x CONFIG FILE
 
# PORT and Transparent Option
#http_port 8080
http_port 8080 transparent
icp_port 0
 
store_dir_select_algorithm round-robin
 
# Cache Direcotries on external Storage, for sure you should change it
# Each folder is of 1.5 TB in space
cache_dir aufs /cache-1/squid-cache-1 1500000 16 256
cache_dir aufs /cache-2/squid-cache-2 15000000 16 256
cache_dir aufs /cache-3/squid-cache-3 15000000 16 256
cache_dir aufs /cache-4/squid-cache-4 15000000 16 256
cache_dir aufs /cache-5/squid-cache-5 15000000 16 256
cache_dir aufs /cache-6/squid-cache-6 15000000 16 256
cache_dir aufs /cache-7/squid-cache-7 15000000 16 256
cache_dir aufs /cache-8/squid-cache-8 15000000 16 256
cache_dir aufs /cache-9/squid-cache-9 15000000 16 256
cache_dir aufs /cache-10/squid-cache-10 15000000 16 256
cache_dir aufs /cache-11/squid-cache-11 15000000 16 256
cache_dir aufs /cache-12/squid-cache-12 1500000 16 256
 
#cache_dir ufs /mnt/hdd2/cache2 200000 16 256 # If you have secondary HDD
memory_replacement_policy heap LFUDA
cache_replacement_policy heap GDSF
 
# If you want to enable DATE time n SQUID Logs,use following
emulate_httpd_log on
logformat squid %tl %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
log_fqdn off
 
# How much days to keep users access web logs
# You need to rotate your log files with a cron job. For example:
# 0 0 * * * /usr/local/squid/bin/squid -k rotate
logfile_rotate 14
debug_options ALL,1
cache_access_log /var/log/squid3/access.log
cache_log  /var/log/squid3/cache_log.log
cache_store_log /var/log/squid3/store.log
 
# Block Ads [zaib]
#acl adsites dstdomain url_regex "/etc/squid/adslist.txt"
#http_access deny adsites
#deny_info http://192.168.6.1/psb.htm adsites
 
#I used DNSAMSQ service for fast dns resolving
#so install by using "apt-get install dnsmasq" first
dns_nameservers 127.0.0.1 8.8.8.8
ftp_user anonymous@
ftp_list_width 32
ftp_passive on
ftp_sanitycheck on
 
#ACL Section mylan myacl
acl all src 0.0.0.0/0.0.0.0 # ALLOW ALL, you may want to change this /zaib
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 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager all
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow all
#http_access allow all2
http_reply_access allow all
#http_reply_access allow all2
icp_access allow all
 
#==========================
# Administrative Parameters
#==========================
 
#============================================================$
# SNMP , if you want to generate graphs for SQUID via MRTG
#============================================================$
#acl snmppublic snmp_community zaib
#snmp_port 3401
#snmp_access allow snmppublic all
#snmp_access allow all
 
# I used UBUNTU so user is proxy, in FEDORA you may use use squid
cache_effective_user proxy
cache_effective_group proxy
cache_mgr SYED_JAHAN_ZAIB
visible_hostname aacable.wordpress.com
unique_hostname aacable@hotmail.com
 
# Memory, in this example, teh squid box have 32 B of RAM
cache_mem 8 GB # Change it as per your hardware config, you may want to lower it down
minimum_object_size 0 bytes
maximum_object_size_in_memory 5 MB # Change it as per your hardware config, you may want to lower it down if you have low ram
 
# 1 year = 525600 mins, 1 month = 43800 mins
refresh_pattern imeem.*\.flv  0 0% 0     override-lastmod override-expire
refresh_pattern \.rapidshare.*\/[0-9]*\/.*\/[^\/]*   161280    90%    161280 ignore-reload
 
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?)    10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern (get_video\?|videoplayback\?id|videoplayback.*id|videodownload\?|\.flv?)    10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
#refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id||videodownload\?|\.flv?)       10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern \.(ico|video-stats) 10800 80% 10800    override-expire ignore-reload ignore-no-cache  ignore-private ignore-auth override-lastmod
refresh_pattern \.etology\?                       10800 80% 10800    override-expire ignore-reload ignore-no-cache
refresh_pattern galleries\.video(\?|sz)               10800 80% 10800    override-expire ignore-reload ignore-no-cache
refresh_pattern brazzers\?                       10800 80% 10800    override-expire ignore-reload ignore-no-cache
refresh_pattern \.adtology\?                      10800 80% 10800    override-expire ignore-reload ignore-no-cache
#refresh_pattern ^.*(utm\.gif|ads\?|rmxads\.com|ad\.z5x\.net|bh\.contextweb\.com|bstats\.adbrite\.com|a1\.interclick\.com|ad\.trafficmp\.com|ads\.cubics\.com|ad\.xtendmedia\.com|\.googlesyndication\.com|advertising\.com|yieldmanager|game-advertising\.com|pixel\.quantserve\.com|adperium\.com|doubleclick\.net|adserving\.cpxinteractive\.com|syndication\.com|media.fastclick.net).* 10800 20% 10800 ignore-no-cache  ignore-private override-expire ignore-reload ignore-auth   negative-ttl=40320 max-stale=10
refresh_pattern ^.*safebrowsing.*google  10800 80% 10800 override-expire ignore-reload ignore-no-cache ignore-private ignore-auth
refresh_pattern ^http://((cbk|mt|khm|mlt)[0-9]?)\.google\.co(m|\.uk) 10800 80% 10800 override-expire ignore-reload   ignore-private
refresh_pattern ytimg\.com.*\.jpg                   10800 80% 10800    override-expire ignore-reload
refresh_pattern images\.friendster\.com.*\.(png|gif)           10800 80% 10800    override-expire ignore-reload
refresh_pattern garena\.com                                   10800 80% 10800     override-expire reload-into-ims
refresh_pattern photobucket.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png)  10800 80% 10800     override-expire ignore-reload
refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\?           10800 80% 10800 ignore-no-cache override-expire override-lastmod
refresh_pattern mediafire.com\/images.*\.(jp(e?g|e|2)|tiff?|bmp|gif|png)    10800 80% 10800 reload-into-ims override-expire ignore-private
refresh_pattern ^http:\/\/images|pics|thumbs[0-9]\.      10800 80% 10800 reload-into-ims ignore-no-cache  ignore-reload override-expire
refresh_pattern ^http:\/\/www.onemanga.com.*\/           10800 80% 10800 reload-into-ims ignore-no-cache  ignore-reload override-expire
 
# ANTI VIRUS
refresh_pattern guru.avg.com/.*\.(bin)                      10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern (avgate|avira).*(idx|gz)$                           10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern kaspersky.*\.avc$                                   10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern kaspersky                                           10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern update.nai.com/.*\.(gem|zip|mcs)                    10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern ^http:\/\/liveupdate.symantecliveupdate.com.*\(zip)     10800 80% 10800 ignore-no-cache  ignore-reload  reload-into-ims
 
refresh_pattern windowsupdate.com/.*\.(cab|exe)             10800  80%  10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern update.microsoft.com/.*\.(cab|exe)             10800  80%  10800 ignore-no-cache  ignore-reload  reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe)             10800  80%  10800 ignore-no-cache  ignore-reload  reload-into-ims
 
#images facebook
refresh_pattern ((facebook.com)|(85.131.151.39)).*\.(jpg|png|gif)      10800 80% 10800 ignore-reload  override-expire ignore-no-cache
refresh_pattern -i \.fbcdn.net.*\.(jpg|gif|png|swf|mp3)                  10800 80% 10800 ignore-reload  override-expire ignore-no-cache
refresh_pattern  static\.ak\.fbcdn\.net*\.(jpg|gif|png)                  10800 80% 10800 ignore-reload  override-expire ignore-no-cache
refresh_pattern ^http:\/\/profile\.ak\.fbcdn.net*\.(jpg|gif|png)      10800 80% 10800 ignore-reload  override-expire ignore-no-cache
 
#banner IIX
refresh_pattern ^http:\/\/openx.*\.(jp(e?g|e|2)|gif|pn[pg]|swf|ico|css|tiff?) 10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/ads(1|2|3).kompas.com.*\/           10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/img.ads.kompas.com.*\/           10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern .kompasimages.com.*\.(jpg|gif|png|swf)       10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/openx.kompas.com.*\/           10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern kaskus.\us.*\.(jp(e?g|e|2)|gif|png|swf)        10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
refresh_pattern ^http:\/\/img.kaskus.us.*\.(jpg|gif|png|swf)       10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache
 
#IIX DOWNLOAD
refresh_pattern ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(mp3|rar|zip|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 10800 99999% 10800 reload-into-ims  ignore-reload override-expire ignore-no-cache    ignore-auth
 
#All File
refresh_pattern -i \.(3gp|7z|ace|asx|avi|bin|cab|dat|deb|divx|dvr-ms)      10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(rar|jar|gz|tgz|bz2|iso|m1v|m2(v|p)|mo(d|v))          10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|css|js)     10800 80% 10800 ignore-no-cache  ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(mp(e?g|a|e|1|2|3|4)|mk(a|v)|ms(i|u|p)|og(x|v|a|g)|rar|rm|r(a|p)m|snd|vob|wav) 10800 80% 10800 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(pp(s|t)|wax|wm(a|v)|wmx|wpl|zip|cb(r|z|t))     10800 80% 10800 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims
 
#########################################################################
 
refresh_pattern (cgi-bin|\?)       0      0%      0
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern ^ftp:         10080     95%     10800 override-lastmod reload-into-ims
refresh_pattern         .     180     95% 10800 override-lastmod reload-into-ims
 
global_internal_static off
retry_on_error on
buffered_logs on
read_ahead_gap 32 KB
 
#header_access Accept-Encoding deny  all
client_persistent_connections off
server_persistent_connections on
half_closed_clients off
strip_query_terms off
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100
vary_ignore_expire on
reload_into_ims on
pipeline_prefetch on
read_timeout 30 minute
client_lifetime 6 hour
positive_dns_ttl 6 hour
pconn_timeout 15 second
request_timeout 1 minute
log_icp_queries off
ipcache_size 16384
ipcache_low 98
ipcache_high 99
log_fqdn off
fqdncache_size 16384
memory_pools off
forwarded_for on
client_db off
max_filedescriptors 8192
 
# ZAIB
# ZPH for Squid 3.3.19
qos_flows local-hit=0x30


After videocache is installed, following is the fine tunned config file. Don’t forget to change the host ip (192.168.100.1) to match your own server ip

VIDEO CACHE CONFIG FILE in /etc/videocache.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[main]
 
# file : /etc/videocache.conf
# (C) Copyright White Magnet Software Private Limited
# Company Website : http://whitemagnet.com/
# Product Website : http://cachevideos.com/
 
# WORKING SAMPLE FILE [JULY 2013] - Syed Jahanzaib
# Email: aacable@hotmail.com
 
# version : cxxxxxxb
 
client_email = your_registered_emai_address@hotmail.com
cache_host = 192.168.100.1
videocache_user = proxy
 
# This option is used to define the cache directories where Videocache will store
# cached videos. We can specify multiple caching directories separated by ‘|’.
# Examples:
#   base_dir = /videocache/
#   base_dir = /cache/videocache2/ | /hdd2/videocache/ | /home/videocache/
base_dir = /cache1/vc/
 
disk_avail_threshold = 15000
disk_cleanup_strategy = 1
enable_videocache = 1
offline_mode = 0
base_dir_selection = 2
enable_store_log_monitoring = 1
squid_store_log = /var/log/squid3/store.log
this_proxy = 127.0.0.1:8080
hit_threshold = 1
max_cache_processes = 10
max_cache_speed = 0
max_cache_queue_size = 100000
cache_period =
proxy =
proxy_username =
proxy_password =
max_video_size = 0
min_video_size = 0
force_video_size = 1
scheduler_pidfile = /var/run/videocache.pid
logdir = /var/log/videocache/
logformat = %tl %p %s %i %w %c %v %m %d
scheduler_logformat = %tl %p %s %i %w %c %v %m %d
cleaner_logformat = %tl %p %s %w %c %v %m %d
timeformat = %d/%b/%Y:%H:%M:%S
enable_videocache_log = 1
enable_scheduler_log = 1
enable_cleaner_log = 1
enable_trace_log = 1
logfile = videocache.log
scheduler_logfile = scheduler.log
cleaner_logfile = cleaner.log
tracefile = trace.log
max_logfile_size = 10
max_scheduler_logfile_size = 10
max_cleaner_logfile_size = 10
max_tracefile_size = 10
max_logfile_backups = 10
max_scheduler_logfile_backups = 5
max_cleaner_logfile_backups = 1
max_tracefile_backups = 1
 
enable_youtube_cache = 1
 
# This options determines if Videocache will cache different YouTube video
# formats separately. Please select an appropriate algorithm from the listed below.
# Available strategies:
#   1 : (disabled) Don't check for YouTube video formats. Cache one of the formats
#       and serve it for requests for all kinds of formats.
#   2 : (strict) Strictly check for YouTube formats and cache all formats separately.
#       Consumes maximum bandwidth.
#   3 : (approximate) Check YouTube formats but with approximation. For example,
#       if a client asked for a video in 480p format and we already have 360p
#       format of the same video in cache, then serve 360p format and vice-versa.
# Default : 3
enable_youtube_format_support = 3
enable_youtube_html5_videos = 1
enable_youtube_3d_videos = 1
enable_youtube_partial_caching = 1
max_youtube_video_quality = 720p
min_youtube_views = 0
enable_aol_cache = 1
enable_bing_cache = 1
enable_bliptv_cache = 1
enable_breakcom_cache = 1
enable_cnn_cache = 1
enable_dailymotion_cache = 1
enable_facebook_cache = 1
enable_megavideo_cache = 1
enable_metacafe_cache = 1
enable_myspace_cache = 1
enable_vimeo_cache = 1
enable_weather_cache = 1
enable_wrzuta_cache = 1
enable_youku_cache = 1
enable_extremetube_cache = 1
enable_hardsextube_cache = 1
enable_keezmovies_cache = 1
enable_pornhub_cache = 1
enable_redtube_cache = 1
enable_slutload_cache = 1
enable_spankwire_cache = 1
enable_tube8_cache = 1
enable_xhamster_cache = 1
enable_xtube_cache = 1
enable_xvideos_cache = 1
enable_youporn_cache = 1
 
skip_apache_conf = 0
apache_conf_dir = /etc/apache2/conf.d/
hide_cache_dirs = 1
rpc_host = 127.0.0.1
rpc_port = 9100

To restart Videocache and related services, use following commands
vc-update
    service apache2 restart
    vc-scheduler -s restart
    service squid3 restart
To view Video cache Logs in live for info and troubleshooting
tail -f /var/log/videocache/videocache.log
tail -f /var/log/videocache/scheduler.log
tail -f /var/log/squid3/access.log
Sample image of logs at live server
VC-CACHE
VC-CACHE

☼☼☼☼☼☼☼☼
Regard’s
Syed Jahanzaib

August 5, 2013

BIM TS3100 Library: Incompatible Magazine!

 
 
 
 
 
 
4 Votes

Recently we replaced our 7 years old IBM TS3200 Tape Library with the new TS3100 FC. For about a week, It worked fine , but when yesterday, our support personnel changed the tape cartridges, and tried to login to the WEBGUI of library to manage and move the tape to drive, it showed following error on screen.
tape error

and the tape library showed this “Scanning” message on its panel and none of any function worked properly
IMAG0480
I tried every possible method of re installing drivers, pulling magazines manually from back using Access hole (small hatches, facing rear of the library) with pin, but no use.

After carefully deep inspection, I found out that the support personnel remove the MAGAZINE FIDUCIALS by mistake (plastic part attached with the every level of magazine where the cartridge is placed) , the support personnel thought it was some sort of un necessary packing ☻
As showed in the image below . . .

fudicials

IMAG0518
After placing the Magazine Fiducials back to its place, every thing worked fine.
Also make sure that you are using the latest Firmware, it helps too :)
Magazine Fiducials  are location sensors utilized by the library accessors.
Possibly it may help some one else too, because in my personal experience, If you don’t have SLA or service contract with the IBM or there vendors, you won’t gonna find much support over the web or in local market.

Regard’s
Waseem Raaj

Comments

Post a Comment

Popular posts from this blog

DMASOFTLAB RADIUS MANAGER BILLING SYSTEM v 4.1 Finally Released

How To Configure Nano Station M2 As Access point