Wednesday, February 27, 2008

Transparent proxy with squid 2.6

I have upgraded my squid from 2.5 STABLE13 to 2.6 STABLE18. Transparent proxy is setup differently in this version. You need this directives in squid.conf (usually in /etc or /usr/local/etc or /usr/local/squid/etc, check with your distro).

acl our_networks src 192.168.2.0/24 127.0.0.1
http_access allow our_networks
http_port 192.168.2.1:3128 transparent
always_direct allow all

where 192.168.2.1 is your proxy server IP address.


If you have flushed your iptables, create new rule:

iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -j REDIRECT –to-port 3128

where 3128 is the port where squid is running.
References:
http://www.deckle.co.za/squid-users-guide/Transparent_Caching/Proxy

Saturday, February 16, 2008

Squid - File size limit exceeded

Yesterday (15th Feb 2008) my squid died unexpectedly. I tried to restart it several times but to no avail. So I tried to see what went wrong by debugging and ran it in foreground. So,

squid -NCd3

N = put it in foreground
C = don't catch fatal signals
d = set debug level (3 is the level)

It threw a bunch of messages with the last line was File size limit exceeded. Just like this but I got no core dumped!. With no clue how to solve it, I recompiled squid (2.6-stable17) with extra parameters (with-max-fd=8192 and --with-large-files):

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-icmp --enable-kill-parent-hack --enable-ssl --enable-linux-netfilter --enable-large-cache-files --enable-follow-x-forwarded-for --with-large-files

It solved it. Shane reported here that this happens when file store.log is bigger that 2 GB. Disabling the use of store.log (or other relevant files for that matter) will get rid of this problem.

Tuesday, February 12, 2008

dbmail 2.2.9 released


From dbmail mailing-list (Feb, 9 2008):

Hi all,

I'm pleased to announce the availability of DBMail version 2.2.9, the latest in the stable/production series.

THis is a bugfix maintenance release.

Bugs fixed since 2.2.8:

DBMail - 2.2.9
==============
- 0000668: [Command-Line programs (dbmail-users, dbmail-util)]
dbmail-export segmentation fault and mbox compatibility (paul)
- 0000663: [Authentication layer] Authldap module reloads when it try to recconect
- 0000662: [Authentication layer] Ability to bypass authentication on Active Directory
- 0000660: [IMAP daemon] imapd provides better inetd compatability (paul)

Changelog:

http://git.dbmail.eu/?p=paul/dbmail;a=shortlog;h=v2.2.9

Download:

http://www.dbmail.org/download/2.2/dbmail-2.2.9.tar.gz


kind regards,
Paul Stevens paul at nfg.nl

What is dbmail?
Read here

Tuesday, January 29, 2008

up-imapproxy-1.2.6 released


From imapproxy-info mailing list:

Hi,

I'm pleased to announce that up-imapproxy-1.2.6 has been released and is
available for download from http://www.imapproxy.org.

Updates since 1.2.5 include:

* General daemon enhancement (closing extra file descriptors at startup,
pidfile support)

* OpenSSL is now threadsafe.

* ipv6 support added.

* In general, this code should be in sync with the debian distribution now.

Many thanks to José Luis Tallón, Jan Grant, Matt Selsky and Antonio Querubin
for their contributions to this release. As always, thanks to Ray Link for
hosting the imapproxy.org site. If I had to pay for hosting, there probably
wouldn't be an imapproxy.org site.

Please send any bug reports, requests, questions, comments, praise, hate,
etc to this mailing list.

Thanks,

Dave
More info: imapproxy

Saturday, January 12, 2008

KDE 4.0 released (at last!)


The much-awaited KDE 4.0 has been released on Friday 11 Jan 2007.

From the announcement page:
The KDE Community is thrilled to announce the immediate availability of KDE 4.0. This significant release marks both the end of the long and intensive development cycle leading up to KDE 4.0 and the beginning of the KDE 4 era.

The KDE 4 Libraries have seen major improvements in almost all areas. The Phonon multimedia framework provides platform independent multimedia support to all KDE applications, the Solid hardware integration framework makes interacting with (removable) devices easier and provides tools for better power management.

The KDE 4 Desktop has gained some major new capabilities. The Plasma desktop shell offers a new desktop interface, including panel, menu and widgets on the desktop as well as a dashboard function. KWin, the KDE Window manager, now supports advanced graphical effects to ease interaction with your windows.

Lots of KDE Applications have seen improvements as well. Visual updates through vector-based artwork, changes in the underlying libraries, user interface enhancements, new features, even new applications -- you name it, KDE 4.0 has it. Okular, the new document viewer and Dolphin, the new file manager are only two applications that leverage KDE 4.0's new technologies.

To install KDE 4.0, the experimental branch must be enabled. Add the following to /etc/apt/sources.list, then update APT.

deb http://ftp.debian.org/debian/ experimental main non-free contrib

deb-src http://ftp.debian.org/debian/ experimental main non-free contrib

APT will not install packages from experimental unless specifically requested. To install a package from experimental, run the command:
aptitude -t experimental install kdebase kdebase-workspace


or

apt-get -t experimental install kdebase kdebase-workspace


Those are the basic packages.
For other packages, please look here.

Have fun!


Friday, January 11, 2008

Testing compiz-fusion on debian

My system:
debian lenny

Installation:

apt-get install compiz-fusion-kde
apt-get install compiz-fusion-gnome

Optional packages:
apt-get install compiz-fusion-plugins-unsupported
apt-get install compiz-fusion-plugins-extra
apt-get install compiz-fusion-icon

Above commands install kde and gnome-specific compiz-fusion backends and all other packages will be automatically installed depending on dependencies. To start compiz-fusion for KDE, go to System -> Compiz Fusion Icon.

Repo:
Put this in /etc/apt/sources.list
deb http://download.tuxfamily.org/shames/debian-etch/desktopfx/stable/ ./

Some screenshots:

Friday, January 4, 2008

Upgrading gcc to upgrade clamav to 0.92



I have problem upgrading my clamav 0.91.2 to 0.92 due to bug in gcc 4.0.1 on my Mandriva 2006. So I upgraded my gcc to 4.1.2. I chose to compile from source. It is advisable to refer to successful builds pertaining to the version of gcc to get a clue whether it will successfully build on your target system. I didn't choose later version because I couldn't find any successful build for my system. So I played safe. :P

Download: GNU gcc 4.1.2 (China Mirror)
You have to download at least gcc-core-4.1.2.tar.bz2 and gcc-4.1.2.tar.bz2. I also downloaded gcc-g++-4.1.2.tar.bz2, and gcc-objc-4.1.2.tar.bz2. I didn't download the others because I didn't need them. You may want to download them depends on your requirement.

Untar the tarballs
tar xjvf gcc-core-4.1.2.tar.bz2
tar xjvf gcc-4.1.2.tar.bz2
tar xjvf gcc-g++-4.1.2.tar.bz2
tar xjvf gcc-objc-4.1.2.tar.bz2

The above commands will untar the tarballs into a dir that is gcc-4.1.2. Then, as usual, run ./configure, make and make install. Before you run ./configure, please run ./configure --help to view what parameters needed. Some of the options are autodetected and included by configure itself (ie c/c++ libraries,headers ,etc).

configure
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var

then you can run make and make install to install it to your system. clamav 0.92 will be successfully compiled with this version of gcc.

UPDATE: Reported that gcc < 4.0 can compile clamav 0.92 successfully. So you don't need to upgrade if you use that version of gcc. Also reported that using the 'buggy' gcc, one can use -O0 as optimization flag to avoid the bug.

upgrading clamav from source
Please read my article here. The steps are still the same.

Good luck!

Nvidia new hotplug feature on Linux

 If you use nvidia driver for your GPU, you probably wonder why in some config, you can't hotplug your second monitor. You need to reboo...