Posts Categorized: linux

Enhancing ClamAV with Extra Signatures

We use ClamAV mainly for scanning incoming email for malware and phishing scams. ClamAV comes with a default database usually stored in /var/clamav or /var/lib/clamav . To get up-to-date malware definitions the following sources can be used: Freshclam The Freshclam binary should have been installed when you installed clamd and you should have a script… Read more »

Refreshing ARP table entries

Taking an IP address down on one host: /sbin/ifconfig eth0:1 down Taking the IP address up on another host: /sbin/ifconfig eth0:1 111.222.111.222 netmask 255.255.225.0 up Use arping to update the ARP tables: /sbin/arping -S 111.222.111.222 -B So the switch should cache the new arp entry invalidating the existing one.The arping utility appears to be part… Read more »

Tunnel Web Browsing to Remote Server over SSH

So I want to be able to test web access from outside our network. On my private server I have Squid running on port 3128 so: ssh -L 3128:localhost:3128 jonny@myprivateserver.com Then I can configure Firefox (with FoxyProxy) to use localhost port 3128 as a proxy. Then on the private server tail the squid access log… Read more »

Blocking Attackers in ProFTPd

To manually block an IP address accessing ProFTPd you can use the following in the ProFTPd config file: <Limit LOGIN>Order deny,allowDeny from 111.222.111.222Allow from all</Limit></Global> Of course it would be better to use IPtables iptables -A INPUT -s 111.222.111.222 -j DROP To allow the IP address again: iptables -D INPUT -s 111.222.111.222 -j DROP Where… Read more »

Convert bin/cue to iso with bchunk

On Ubuntu install binchunker with: sudo apt-get install bchunk Then create the iso at the command-line with the following: bchunk myfile.bin myfile.cue newfile.iso More info here

Top of the Tops

A roundup of my top top utilities for troubleshooting problems on servers. htopIn terms of alternatives to the traditional top command htop is pretty good (being better than the older atop too). Maybe it is just the colours but it is also useful to get a view of the memory without the caches included. yum… Read more »

Samba Client

Smbclient operates like a command-line ftp client which allows sending commands to the samba server. The following syntax worked for me: /usr/bin/smbclient ‘//anotherserver/myshare’ -D ‘mydirectory/’ -c ‘mkdir “testlog5″‘ -U ‘myusername%mypass’ I got a bit confused when some directories where list with DA rather than D but these extra file attributes appear to be: A –… Read more »

Get iPlayer

The previous version of get_iplayer had stopped working for me but there is still people updating this script. Get it here: http://www.infradead.org/get_iplayer/html/get_iplayer.html

WineTricks for Windows Dependencies

Download the WineTricks script from here: http://wiki.winehq.org/winetricks Make it executable and then move it to /usr/bin or /usr/local/bin Run it and a GUI will appear to tick the stuff you need e.g. 7zip, AdobeAIR, mono, corefonts and many more