Archive for July, 2007

FreeBSD FTP tips & tricks

Q. Does anyone know if the default ftp server from FreeBSD allow me to give acces to users only for ftp, no shell access to upload files to there home directories?
A. The default ftpd will work with a little tweaking.
touch /bin/ftpshell
echo “/bin/ftpshell” >> /etc/shells

When you add your users, set their shell to /bin/ftpshell
echo USERNAME >> [...]


Bandwidth management with FreeBSD (using ipfw)

You have FreeBSD installed on your server and you want to manage your bandwidth, here is a short example to start:
ipfw add pipe 1 ip from any to 192.168.2.x out
ipfw add pipe 2 ip from 192.168.2.x to any in
ipfw pipe 1 config bw 10KB/s queue 10 # download speed
ipfw pipe 2 config bw 5KB/s [...]


How to clone an OpenVZ virtual machine

I need sometimes to clone a vps in an openvz environment, so here you can find three methods to do this task:
first option:
# vzctl stop 101
Stopping VE …
VE was stopped
VE is unmounted
# cp -r /vz/private/101 /vz/private/202
# cp /etc/vz/conf/101.conf /etc/vz/conf/202.conf
# vzctl start 202
Starting VE …
Initializing quota …
VE is mounted
Setting CPU units: 1000
VE start in progress…
the [...]


Backup in a single command line

If you want to do a simple backup of a directory, and also to send the archive over ssh on another machine, here is the useful command:
# tar czvf – /usr/local/etc/www/data | ssh user@192.168.1.1 “cat > www.tar.gz”


A Simple Firewall for Linux Server

The firewall below will let in SSH, HTTP and FTP. To avoid SSH brute force dictionary attacks it uses the iptables recent match module for connection rate limiting. It is intended for a Host with a single interface connected to the net, eg. a webserver.
Hint before enabling it add this to your /etc/crontab:
*/5 [...]


Play a MP3 list over HTTP

All my mp3s are stored on my filesever. Normally I just mount the mp3 directory on my current workstation (either via NFS or Samba). I have some playlists too which store all files with relative paths (relative to the playlist location). This works fine.
But sometimes I want to have an easy way to listen [...]


Panache and Peril with Plesk (Spamassassin instalation)

This is a copy of the original article, see it here
With this new dedicated server, I chose Plesk as a control panel solely because I hated it less than Ensim or cPanel. Normally I’d do all the installation, configuration, and tweaking of a server myself, but I just don’t have time for that [...]


Hello world! I am back with a new look!

Welcome to my WebSpace. This is the new look of my site, blog and wiki, all in one . Feel free to read and post comments, I am glad to hear your opinions regarding what I wrote. See you soon …