Archiv

Archiv für die Kategorie ‘Linux’

How to run Squid proxy with ClamAV virus scanner

2. Juli 2011 Keine Kommentare

First you have to compile and install the latest version of Squid, ClaimAV and HAVP

Squid
./configure –prefix=/usr/local/squid_3/
make
make install

vi /usr/local/squid.conf

#HAVP CONFIG
cache_peer 127.0.0.1 parent 8080 0 no-query no-digest no-netdb-exchange default
cache_peer_access 127.0.0.1 allow all
#Only HTTP traffic should go through HAVP
acl Scan_HTTP proto HTTP
never_direct allow Scan_HTTP

acl none_HAVP  proto HTTPS FTP
always_direct allow none_HAVP

ClamAV
./configure –prefix=/usr/local/clamav/
make
make install

HAVP
./configure –prefix=/usr/local/HAVP/
make
make install

Now it should work!
/usr/local/squid_3/squid start

Categories: Linux, Squid Tags: , , , , ,

How to activate a swap partition?

7. September 2009 Keine Kommentare

vi /etc/fstab
/dev/sda                 swap       defaults                   0 0

swapon /dev/sda

Categories: Linux, RedHat, SuSE Tags: , ,

How to find out Linux kernel and distribution version

18. Juni 2009 Keine Kommentare

Distribution version
less /etc/issue

Kernel version
less /proc/version

Categories: Linux, RedHat, SuSE Tags: , , ,

How to limit squid bandwidth for YouTube & Co

15. Juni 2009 Keine Kommentare

vi /etc/squid/squid.conf

#Stream & Download Limit

#URL based
acl stream_1 url_regex -i video.google .googlevideo .myvideo .youtube
acl stream_2 urlpath_regex -i .flv$ .swf$ .mp3$ .mpg$ .wmv$ .rm$ .asf$

#Mime-Type based
acl stream_3 req_mime_type -i video/x-flv$ video/flv$ video/x-swf$ video/x-swf$ application/x-fcs$

#Header based
acl stream_4 req_header -i video/x-flv$ application/x-fcs$ video/flv$ video/x-swf$ video/x-swf$

delay_pools 1
delay_class 1 1

#Up-Down limit
delay_parameters 1 99999/99999

delay_access 1 allow stream_1
delay_access 1 allow stream_2
delay_access 1 allow stream_3
delay_access 1 allow stream_4
delay_access 1 deny all

Categories: Linux, Squid Tags: , ,

How to ensure raw devices loaded automatically at startup

11. Juni 2009 Keine Kommentare

vi /etc/udev/rules.d/60-raw.rules

ACTION==“add“, KERNEL==“sdb1″, RUN+=“/bin/raw /dev/raw/raw1 %N“
ACTION==“add“, KERNEL==“sdb2″, RUN+=“/bin/raw /dev/raw/raw2 %N“
ACTION==“add“, KERNEL==“sdb3″, RUN+=“/bin/raw /dev/raw/raw3 %N“
ACTION==“add“, KERNEL==“sdb5″, RUN+=“/bin/raw /dev/raw/raw10 %N“
ACTION==“add“, KERNEL==“sdb6″, RUN+=“/bin/raw /dev/raw/raw11 %N“
ACTION==“add“, KERNEL==“sdb7″, RUN+=“/bin/raw /dev/raw/raw12 %N“
ACTION==“add“, KERNEL==“sdb8″, RUN+=“/bin/raw /dev/raw/raw20 %N“
ACTION==“add“, KERNEL==“raw*“, OWNER==“sybase“, GROUP==“sybase“, MODE==“0640″

Categories: RedHat Tags: , , ,