Jun 182011
 

firewallI use iptables by many years and used it also for complex solutions and only recently i’ve discovered ufw (Uncomplicated Firewall), the ubuntu version, or better developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall. By default UFW is disabled.
Continue reading »

Flattr this!

Jun 162011
 

nginxOn my site I had a small problems with feeds, i’ve them managed with feedburner and I’ve 1 feed for every language, so you can choose to have the feeds in English or in Italian. The problem is that I’d like that when a user write http://linuxaria.com/feed it land on my feedburner page for English while writing http://linuxaria.com/feed?lang=it he should lands on the Italian feed page.

I’ve tried with the wordpress plugin for feedburner, but that it’s good only if you have 1 feed, because it blindly redirect everything to 1 feedburner address, so it’s not a good solution for my 2 bilingual feeds.

And so I’ve done it with a rewrite in Nginx.
Continue reading »

Flattr this!

Jun 162011
 

sudoThe stat command is really useful to gather information from file, directory and file system.
The basic usage of stat is:

~#stat /etc/passwd
 
File: `/etc/passwd'
Size: 999       	Blocks: 8          IO Block: 4096   regular file
Device: ca00h/51712d	Inode: 845         Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2011-05-26 12:14:41.000000000 +0200
Modify: 2011-05-26 12:14:41.000000000 +0200
Change: 2011-05-26 12:14:41.000000000 +0200

So, without options you can have the following information

File : Size in Bytes
Blocks : Number of blocks used
IO Block : Size in bytes of every block.
Device : The identifier number of your storage device (harddrive, etc.)
Inode : The inode number that the file or directory is linked to.
Access/Modify and change Times : Note that the timestamps also include which time zone that accesses or modifications took place in. in this example +0200 Continue reading »

Flattr this!

Jun 142011
 

sudoI think that sudo is become a wide used command with Ubuntu, where you don’t even have a root password, before that probably it was used only in some data-centers to restrict access to some commands.

sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file.

In this article I will show some uses a little less common for this command, for a general description of the command you could read the page about sudo on wikipedia

Continue reading »

Flattr this!

Jun 112011
 

monit If you are in charge of some services probably you have set up some monitoring system to notify you if something go wrong (email, sms or a Tweet), and so you can fix it quickly. But do you really want to be always available 24×7 every day of the year ?

I’m not for sure, so let’s see Monit, a fantastic tool that can manage some problems for you and let you enjoy your free time.
Continue reading »

Flattr this!