Linux

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/debuntu.info/

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

Go into the site folder:

$ cd /home/user/domains/debuntu.info/

Enable maintenance mode for the site:

$ drush variable-set maintenance_mode 1

Clear all caches:

$ drush cache-clear all

Backup:

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:

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 https://launchpad.net/~cinelerra-ppa

Sensors does not work on Asus P5Q

Ubuntu 9.10 Karmic Koala
On the site are advised to use latest lm-sensors 3.1.1.
  1. Remove the current lm-sensors.
  2. Downloaded from the unstable branch of Debian package with lm-sensors 3.1.1.
  3. I tried to install the downloaded package: # dpkg -i lm-sensors*.deb
  4. Revealed unmet dependencies -> libsensors4.

calibre from ppa

Program Calibre of the standard repositories do not connect my PocketBook902. I found the repository with the latest version of Calibre:

$ sudo add-apt-repository ppa:n-muench/programs-ppa
yet there are audacity, filezilla, wireshark. Look here: https://launchpad.net/~n-muench

Pages