Iptables rules for local ntp server

Iptables rules for local ntp server, prohibiting synchronization with other time servers.

Encrypted swap not mount on boot

swapon: /dev/mapper/cryptswap1: stat failed: No such file or directory

I use option offset=4096 in file /etc/crypttab.

# cat /etc/crypttab
cryptswap1 UUID=73bdb3b5-7c82-4a86-a6fd-7219f42c87b3 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,offset=4096

Don't forget:
# update-initramfs -u

Chromium and Youtube. This video is currently unavailable.

Youtube on Chromium sometimes has problem. Youtube says: "This video is currently unavailable". Video will be played after install package chromium-codecs-ffmpeg-extra:

$ sudo aptitude install chromium-codecs-ffmpeg-extra

How to allow downloads from ftp servers to localhost

Step first
We need load module nf_conntrack_ftp:
# modprobe nf_conntrack_ftp
Don't forget add line to file /etc/modules:
# echo nf_conntrack_ftp >> /etc/modules

Step second
Add rules to iptables:
iptables -A OUTPUT -p tcp -m tcp --dport 21 -j ACCEPT
iptables -A INPUT  -p tcp -m tcp --sport 21 -j ACCEPT -m conntrack --ctstate RELATED,ESTABLISHED
iptables -A OUTPUT -p tcp -m tcp --dport 1024:65535 -j ACCEPT -m conntrack --ctstate RELATED,ESTABLISHED

Drupal 7 Using drush to update modules

Path to the folder for my site: /home/user/domains/

Path to the folder for backups: /home/user/backup/

Go into the site folder:

$ cd /home/user/domains/

Enable maintenance mode for the site:

$ drush variable-set maintenance_mode 1

Clear all caches:

$ drush cache-clear all


pkgng 32bit repository error upgrade

Google translated + manual correction

Freshly installed FreeBSD 9.1 i386

When upgrading climbed error:

Truecrypt mount partitions by UUID

Unfortunately, unformatted partitions do not have a UUID, but you can mount partitions on /dev/disk/by-id. For example, so I mounted a partiton for photos in rc.local:

# truecrypt -t -p "" --protect-hidden=no --keyfiles=/bbc.key /dev/disk/by-id/ata-ST2000DL003-9VT156_5YD2D11A-part2 /media/photos

After installing Ubuntu 12.04 low screen resolution

After installing Ubuntu 12.04, I found that a 17-inch monitor is in mode1024x768. I looked in Preferences - Monitors and saw the two screens. First fake with the name "laptop" and the second real LG.
From a terminal prompt I ran:
$ xrandr
The utility showed me two video outputs: LVDS1 and VGA1. Need to disable LVDS1. Adding to the startup command:

Disassembly of the trackball Logitech M570

The trackball is easily disassembled. To do this need unscrew the five screws (see picture). A ball may be removed by slightly pressing through the hole bottom.

Cinelerra: Quick Start Manual PDF

Cinelerra — powerful video editor for Linux. I use this program instead of Pinnacle studio for Windows.
Cinelerra can be installed from