Selective routing on Linux

Sometime it’s needed to selectively route specified IPs or networks via different interface – i.e. if you want to route private addresses over VPN (a.k.a split tunnel routing) or to route some public IPs over VPN to unblock some nationally restricted sites (Netflix). Here are simple scripts to achieve this.

firefox 31 + self-signed certificate = sec_error_ca_cert_invalid

If you are trying to access site with self-signed certificate with Firefox 31 (or later) and get Issuer certificate is invalid error (sec_error_ca_cert_invalid), you have to disable new mozilla::pkix certificate verification. In about:config set security.use_mozillapkix_verification = false To find out more about mozilla::pkix and why your firefox just got so super secure and paranoid, that […]

Fixing pg_dump invalid memory alloc request size

I’ve encountered unusual problem while dumping one of the bigger PostgreSQL databases. Every try to run pg_dump resulted in this: sam@cerberus:~/backup$ pg_dump -v -c js1 >x pg_dump: Error message from server: ERROR: invalid memory alloc request size 18446744073709551613 pg_dump: The command was: COPY job.description (create_time, job_id, content, hash, last_check_time) TO stdout; pg_dump: *** aborted because […]

Monitoring disk drives via collectd

I’ve made two simple (but useful) disk drive monitoring scripts for collectd exec plugin. You can find them on http://devel.dob.sk/collectd-scripts/. smartmon.sh This script monitors SMART attributes of given disks using smartctl (smartmontools). megamon.sh This one monitors some interesting values of MegaRaid adapter physical drives using MegaCli tool.   Description how to use them can be […]

gentoo + xen compilation problems

If you get following compilation error while emerging xen (resp. xen-tools): arch/i386/core/cpu.c: In function ‘get_cpuinfo’: arch/i386/include/bits/cpu.h:79:2: error: can’t find a register in class ‘BREG’ while reloading ‘asm’ arch/i386/include/bits/cpu.h:79:2: error: can’t find a register in class ‘BREG’ while reloading ‘asm’ arch/i386/include/bits/cpu.h:79:2: error: can’t find a register in class ‘BREG’ while reloading ‘asm’ arch/i386/include/bits/cpu.h:79:2: error: can’t find […]