<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Geoffrey Timmerman RSS feed - News</title>
		<link>http://www.geoffke.be/</link>
		<atom:link href="http://www.geoffke.be/rss/nieuws.rss.xml.php" rel="self" type="application/rss+xml" />
		<description>All latest TV updates and news articles from Geoffrey Timmerman can be found here.</description>
		<language>nl-BE</language>
		<item>
			<title>How to setup time synchronisation on Ubuntu 10.04LTS.</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=18</link>
			<description>NTP is a TCP/IP protocol for synchronising time over a network. Basically a client requests the current time from a server, and uses it to set its own clock.

Standard Ubuntu comes with ntpdate, which is a ntp client that runs on boot time to synchronise the machines clock with the Ubuntu NTP server. Normally this will do fine for most of us. However a clock is likely to drift between boot times and for some applications it would be better to always have the correct time in sync. 

I needed this feature @ my work since our maintenance department server is connected to the PLC to get the latest alarm logs for our technicians. So here time was critical for the logging, if the time would be able to drift, the logs would not have been synchronous between the server and the PLC!
How do we accomplish this? First we need to install ntpd to the machine that you want to be synchronised, then you setup some time servers to synchronise with. Follow the instructions below.

[u][b]1. Install NTP. [/b][/u]
Open a terminal and install ntp with this command:
[code]sudo apt-get install ntp[/code]

[u][b]2. Configuring NTP.[/b][/u]
In the terminal screen issue this command which will open the config file in nano:
[code]sudo nano /etc/ntp.conf[/code]
Go to the line that says &quot;# You do need to talk to an NTP server or two (or three).&quot;
Here you will see that the ubuntu ntp server is set as standard. 
[code]server ntp.ubuntu.com[/code]
you can add your own time-servers here to synchronise with, http://www.pool.ntp.org/zone/europe or http://www.pool.ntp.org/zone/north-america lists good servers to start with!
I have commented out the Ubuntu server in this example:
[code]#server ntp.ubuntu.com
server 0.europe.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org[/code]
At work I have used the NTP servers given by our network administrator.

After configuring you need to restart the ntp service to be able to start the synchronisation with the servers you have given. 
Use this command to restart the NTP service:
[code]sudo service ntp restart[/code]
You will see these messages appear when restarting:
[code] * Stopping NTP server ntpd                                              [ OK ]
 * Starting NTP server ntpd                                              [ OK ][/code]
The NTP service should be synchronising right now.

[u][b]3. Check if NTP is synchronising.[/b][/u]
You can check if the NTP service is synchronising with this command:
sudo ntpq –np
It will list the NTP servers by their IP address:
[code]     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 19.148.2.129    10.241.0.1       4 u   21   64    7    0.484   -5.148   0.635
 10.241.0.1      10.244.0.10      3 u   22   64    7    1.141   -1.300   5.325[/code]
 If you want to see the same list, but with the servers listed by their dns address, use this command instead:
sudo ntpq -c lpeer

[u][b]4. Manual synchronising.[/b][/u]
It could be handy sometimes to sync manually to a given server, you can do this as follows:
[code]ntpd -q [/code]

[u][b]5. Log check.[/b][/u]
You can monitor the logs to see how the synchronisation is going:
[code]sudo tail -f /var/log/syslog[/code]
You should see a log message appear when synchronising as this one:
[code]Dec 16 16:19:43  ntpd[10946]: synchronized to 10.241.0.1, stratum 3[/code]
Where hostname is the hostname of your machine.

[u][b]6. Firewall ports.[/b][/u]
The only thing that needs to be checked when your firewall is on that it allows port 123 on UDP level. 

For any support, also check this forum [url=http://ubuntuforums.org/showthread.php?t=862620]http://ubuntuforums.org/showthread.php?t=862620[/url]</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=18</guid>
			<pubDate>Fri, 16 Dec 2011 16:42:08 +0100</pubDate>
		</item>
		<item>
			<title>Ubuntu MythTV iPhone and iPad remote</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=17</link>
			<description>If you the owner of an iPhone, another type of  smart-phone or even an iPad, it could come in handy to have them to act as a remote control for your MythTV installation based on Ubuntu (this works on MythBuntu too!).
I was planning to write some sort of remote control until I stumbled on the code of [url=http://www.legatissimo.info/node/355]Kyle Stoneman[/url]. He had written a HTML interface and used Python to fulfil the telnet command part which is needed to control MythTV. This worked as a charm but the code was a little outdated.

Since I like working with PHP and I see more possibilities using this language instead, for instance connecting to the MythTV MySQL back-end to read out recordings or receiving program info, I  have rewritten the code with PHP and optimized it for use with other smart-phone devices. The optimized front-end code now works with XHTML and CSS3 and is tested on an iPhone 4 and iPad 2 and works perfect!

[url=http://www.geoffke.be/downloads/TV/mythremote.tar.gz]Download the mythremote here![/url] You can open it using File Roller in Ubuntu or Archive Utility in Mac OSX or WinRAR in Windows.

To install the mythremote you need to make sure Apache2 and PHP5 is installed on your MythTV system. If your MythTV front-end installation is installed on the same box as your back-end and you have mythweb running, you are already good to go and you can skip to &quot;3. Copy mythremote to the Apache directory&quot;. 
If you have a separated back and front-end then you need to install Apache2 and PHP5 to your front-end box, follow the instructions below.

[u][b]1. Check if Apache and PHP is installed:[/b][/u]
You can check if Apache and PHP are installed by entering the following command in the terminal on the front-end: 
[code]dpkg --list|grep -e httpd -e apache -e php5[/code]
You should get a list of packages as following:
[code]ii  apache2                         2.2.14-5ubuntu8.7                 Apache HTTP Server metapackage
ii  apache2-mpm-prefork             2.2.14-5ubuntu8.7                 Apache HTTP Server - traditional non-threade
ii  apache2-utils                   2.2.14-5ubuntu8.7                 utility programs for webservers
ii  apache2.2-bin                   2.2.14-5ubuntu8.7                 Apache HTTP Server common binary files
ii  apache2.2-common                2.2.14-5ubuntu8.7                 Apache HTTP Server common files
ii  libapache2-mod-php5             5.3.2-1ubuntu4.10                 server-side, HTML-embedded scripting languag
ii  php5                            5.3.2-1ubuntu4.10                 server-side, HTML-embedded scripting languag
ii  php5-cli                        5.3.2-1ubuntu4.10                 command-line interpreter for the php5 script
ii  php5-common                     5.3.2-1ubuntu4.10                 Common files for packages built from the php
ii  php5-curl                       5.3.2-1ubuntu4.10                 CURL module for php5
ii  php5-gd                         5.3.2-1ubuntu4.10                 GD module for php5
ii  php5-mysql                      5.3.2-1ubuntu4.10                 MySQL module for php5[/code]
Look for &quot;ii&quot; beside the package name, indicating it&#39;s installed. Check the [url=https://help.ubuntu.com/10.04/serverguide/C/php5.html]Ubuntu manual about PHP[/url] for more information.

[u][b]2. Install Apache and PHP:[/b][/u]
If Apache or PHP isn&#39;t installed, you need to install it off course. Open a terminal and use this command to prepare your front-end box with Apache and PHP:
[code]sudo apt-get install apache2 php5 libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-curl[/code]
After this you need to restart Apache or you could deal with issues like the PHP module not working properly:
[code]sudo service apache2 restart[/code]
You will see a message when Apache is restarting:
[code] * Restarting web server apache2 
... waiting                                              [ OK ][/code]

[u][b]3. Copy mythremote to the Apache directory:[/b][/u]
If you didn&#39;t download the remote yet, you can download it [url=http://www.geoffke.be/downloads/TV/mythremote.targ.gz]here[/url]. Now unpack &quot;mythremote.tar.gz&quot; and copy the &quot;mythremote&quot; directory with contents to the Apache directory &quot;/var/www/&quot; on the front-end box. 
If you do this via SSH from another machine, you need to be sure to have all proper rights to the Apache directory, when copying the files directly from the front-end itself to the Apache directory, you need to open the file manager with root rights. On MythBuntu you can do this by entering following command in the terminal:
[code]sudo thunar[/code]
On a Ubuntu front-end we do this with Nautlius:
[code]sudo nautilus[/code]
Now copy the &quot;mythremote&quot; directory to &quot;/var/www/&quot;.

[u][b]4. Prepare MythTV to be able to receive remote commands:[/b][/u]
To be able for your MythTV front-end to receive telnet commands, you must enable it in the front-end setup. Start mythfrontend and choose Utilities &gt; Setup &gt; General &gt; Remote Control. Check the box &quot;Enable Network Remote Control interface&quot; and click finish to apply.

[img]http://www.geoffke.be/images/nieuws/lirc_mythtv.png[/img]

[u][b]5. Testing:[/b][/u]
Open a browser on the front-end machine and navigate to:
[code]http://localhost/mythremote/[/code] 
or 
[code]http://127.0.0.1/mythremote/[/code]
You should see the remote appearing. If you want to test using your iPhone, iPad or another smartphone, use this link instead:
[code]http:///mythremote/[/code]
Additional information -&gt; You can choose from 4 templates if you edit config.inc.php.

This should be all. If you have any questions, just mail them using the [url=http://www.geoffke.be/contact/ ]contact form[/url]. And remember when you&#39;re having trouble, most information can be found searching the [url=http://ubuntuforums.org/]Ubuntu Forums[/url] or try [url=http://www.google.com]Googling[/url] it!</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=17</guid>
			<pubDate>Wed, 14 Dec 2011 09:21:33 +0100</pubDate>
		</item>
		<item>
			<title>How to install an APC Back-UPS RS 800 UPS on Ubuntu 10.04 LTS</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=16</link>
			<description>This week I had to install an APC Back-UPS RS 800 UPS on a web server at my work.
I never done this before so I had to take the APC and Ubuntu manual to do this. Since this type of UPS could be used on your home network or even a small office network I thought it would be interesting to post the steps I have taken to get it installed, it might help someone out.
For those who want to know what an UPS does, here we go: 
An UPS or Uninterruptible Power Supply is a device that helps you to protect your hardware and data when a power-loss or fluctuations occur on the net-current. 
Depending on the batteries used in the UPS, it can let you run your server for 30 minutes or even longer during a powerloss. When the batteries are almost empty, the UPS sends a &quot;shutdown&quot; signal to your server.

[b][u]1. Installing the UPS hardware.[/u][/b]
Installing the device is quite easy, just follow the [url=http://www.geoffke.be/downloads/nieuws/APC_Back-up_RS800_installation_manual.pdf]installation manual [/url] that is delivered with your device and your good to go. For the model I have used, I have found all documentation [url=http://www.apc.com/resource/include/techspec_index.cfm?base_sku=br800i]here[/url].

After installing and powering on, you should check if Ubuntu is able to see the connected UPS, enter following command in the terminal:
[code]lsusb[/code]
As result you should see the UPS listed between the other USB devices. 
[code]Bus 007 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply[/code]

[b][u]2. Installing the UPS software.[/u][/b]
To be able to monitor your UPS, you need to install the APC software, for windows this is Powerchute, for Linux it means compiling, but luckily Ubuntu has a software packet ready in the repository, called Apcupsd. 
Just enter following command in the terminal to install it:
[code]sudo apt-get install apcupsd apcupsd-cgi[/code]
After installing, we need to set a value to yes in the Apcupsd-devel internal configuration, edit  /etc/default/apcupsd:
[code]sudo nano /etc/default/apcupsd[/code]
And set the ISCONFIGURED value to &quot;yes&quot;.
[code]ISCONFIGURED=yes[/code]
Be sure to save properly!

[b][u]3. Configuring the UPS software.[/u][/b]
We need to adjust the configuration to our needs, so start with editing the configuration file:
[code]sudo nano /etc/apcupsd/apcupsd.conf[/code]
find following lines and change them to the values below:
[code]UPSNAME myups
UPSCABLE usb
UPSTYPE usb
DEVICE[/code]
Save the changes and start the UPS software:
[code]sudo apcupsd start[/code]
You can check the UPS status using this command:
[code]sudo apcaccess status[/code]
The status of the device should show up in your terminal like this:
[code]APC      : 001,044,1112
DATE     : Fri Oct 07 12:31:27 CEST 2011
HOSTNAME : ecgohd
VERSION  : 3.14.6 (16 May 2009) debian
UPSNAME  : MyUPS
CABLE    : USB Cable
MODEL    : Back-UPS BR  800
UPSMODE  : Stand Alone
STARTTIME: Wed Oct 05 17:29:17 CEST 2011
STATUS   : ONLINE
LINEV    : 234.0 Volts
LOADPCT  :  19.0 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT :  41.2 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 230.0 Volts
SENSE    : Low
DWAKE    : 000 Seconds
DSHUTD   : 000 Seconds
LOTRANS  : 188.0 Volts
HITRANS  : 269.0 Volts
RETPCT   : 000.0 Percent
ITEMP    : 29.2 C Internal
ALARMDEL : Always
BATTV    : 27.6 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Low line voltage
NUMXFERS : 1
XONBATT  : Thu Oct 06 16:23:38 CEST 2011
TONBATT  : 0 seconds
CUMONBATT: 7 seconds
XOFFBATT : Thu Oct 06 16:23:45 CEST 2011
SELFTEST : NO
STATFLAG : 0x07000008 Status Flag
SERIALNO : 
BATTDATE : 2001-09-25
NOMOUTV  : 230 Volts
NOMINV   : 230 Volts
NOMBATTV :  24.0 Volts
NOMPOWER : 540 Watts
FIRMWARE : 9.o5 .I USB FW:o5
APCMODEL : Back-UPS BR  800
END APC  : Fri Oct 07 12:31:29 CEST 2011[/code]
If an error occurs you can check the logfile:
[code]sudo tail -f /var/log/apcupsd.events[/code]

[b][u]4. Using the UPS webapplication.[/u][/b]
After installing the software you need to restart your Apache server to activate the webstatus &quot;apcupsd-cgi&quot; of your UPS:
[code]sudo service apache2 restart[/code]
You can check the status using following link:
[code]http:///cgi-bin/apcupsd/multimon.cgi[/code]</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=16</guid>
			<pubDate>Fri, 07 Oct 2011 17:08:59 +0200</pubDate>
		</item>
		<item>
			<title>How to install extra themes in Ubuntu 10.04 LTS desktop</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=15</link>
			<description>It is already widely known among Ubuntu users, but for those who are starting with Ubuntu, and then especially with the LTS (Long Term Support) release, here is how you can change the look and feel of your desktop by installing new themes. There is a wide distribution of many different themes available, for instance the Bisigi themes (see further in this article). This article will take on the most popular themes and explain to you how to install them.

[u][b]1. Community themes.[/b][/u]
The community artwork team also has some themes available that you can install, open a terminal and type in:
[code]sudo apt-get install community-themes[/code]
Now go to System -&gt; Preferences -&gt; Appearance and select the Theme tab and choose a new theme.

[u][b]2. Bisigi themes.[/b][/u]

Here is an example for of the themes available:
[img]http://www.geoffke.be/images/nieuws/bisigi_themes.jpg[/img]

If you want to install the Bisigi themes, just open a terminal and type:
[code]sudo add-apt-repository ppa:bisigi/ppa[/code]
to add the stable repository to the list.
Next, you have to perform an update:
[code]sudo apt-get update[/code]
And now you can install the themes:
[code]sudo apt-get install bisigi-themes[/code]
Now go to System -&gt; Preferences -&gt; Appearance and select the Theme tab and choose a new theme.
If you want to know more about this project, just take a look [url=http://www.bisigi-project.org/?lang=en]here[/url]. Note that these theme&#39;s are also available for Ubuntu 11.04!

[u][b]3. Change your Ubuntu into Mac OSX.[/b][/u]
There is also a option to turn your desktop into Mac OSX! 

[img]http://www.geoffke.be/images/nieuws/lucid-mac.jpg[/img]

It&#39;s not that hard to do at all and it&#39;s the closest you can get changing Ubuntu into mac. Take a look at the following link for the how-to: [url=http://maketecheasier.com/turn-ubuntu-lucid-mac-os-x/2010/06/01]http://maketecheasier.com/turn-ubuntu-lucid-mac-os-x/2010/06/01[/url]</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=15</guid>
			<pubDate>Sun, 18 Sep 2011 19:25:10 +0200</pubDate>
		</item>
		<item>
			<title>How to quickly scale and rotate images in Ubuntu 10.04 LTS</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=14</link>
			<description>XP had it&#39;s power-toys, that made it possible for the user to quickly scale and rotate images. It&#39;s a handy tool for webmasters to reduce images before putting them online. Ubuntu has a tool which does exactly the same for you, it is called nautilus-image-converter.
Just right click one image or a whole bunch you have selected and convert them. But first, how do we install this add on?

Open a terminal screen and type in:
[code]sudo aptitude install nautilus-image-converter[/code]
Now just restart your gnome session or type in following command to enable it:
[code]nautilus -q[/code]
You should see 2 new shortcuts in the menu when right clicking an image.
[img]http://www.geoffke.be/images/nieuws/nautilus_image_converter.png[/img]
Clicking on resize gives you the following option:
[img]http://www.geoffke.be/images/nieuws/nautilus_resize_images.png[/img]</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=14</guid>
			<pubDate>Mon, 05 Sep 2011 10:44:47 +0200</pubDate>
		</item>
		<item>
			<title>How to setup Sendmail as a smarthost on Ubuntu 10.04 LTS</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=13</link>
			<description>Some Internet service providers (ISP) do not allow you to have a working mail server due to anti-spam policies, they block all outgoing traffic on port 25.
However, you can use the mail server of your ISP to send your mails. In this article I will describe how to set up sendmail as a smarthost. 

[u][b]1. Install sendmail.[/b][/u]
First we need to install sendmail:
[code]sudo apt-get install sendmail[/code]
Just answer the default prompts to finish your installation.

[u][b]2. Configuring sendmail as a smarthost.[/b][/u]
Open your sendmail config using nano:
[code]sudo nano /etc/mail/sendmail.mc[/code]

Find the line that starts with [b]MAILER_DEFINITIONS[/b] and add following lines below:
[code]define(`SMART_HOST&#39;, )dnl[/code]

As a smarthost you need to use the outgoing mailserver of your ISP, see the example below:
[code]define(`SMART_HOST&#39;,`relay.skynet.be&#39;)dnl[/code]

To use the configuration changes you have made, you need to regenerate the sendmail.cf:
[code]sudo bash -c &quot;cd /etc/mail/ &amp;&amp; m4 sendmail.mc &gt; sendmail.cf&quot;[/code]

Now restart Sendmail:
[code]sudo service sendmail restart[/code]

Send a mail from terminal to check if your configuration works, replace email@domain with your email address and hit CTRL + D to send the mail:
[code]mail -s &quot;Subject&quot; email@domain.com[/code]

You can check your mail log for errors:
[code]tail -400 /var/log/mail.log[/code]

[u][b]3. Send mails from PHP.[/b][/u]
If you have a webserver running on your Ubuntu installation and you want to send mails from PHP, you need to make some changes to the php.ini file to make it work! Open the php configuration (php.ini):
[code]sudo nano /etc/php5/apache2/php.ini[/code]

Now find the line that contains the sendmail arguments (search for &quot;sendmail&quot; using CTRL + W in nano) and change sendmail path = to this:
[code]sendmail_path = /usr/sbin/sendmail -t -i -f root@[/code]
for example:
[code]sendmail_path = /usr/sbin/sendmail -t -i -f root@geoffke.be[/code]
Save the changes (CTRL + X) and restart apache:
[code]sudo /etc/init.d/apache2 restart[/code]
</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=13</guid>
			<pubDate>Mon, 29 Aug 2011 06:47:03 +0200</pubDate>
		</item>
		<item>
			<title>How to configure the firewall on Ubuntu 10.04 LTS using UFW (Uncomplicated Firewall)</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=12</link>
			<description>The default firewall configuration tool for Ubuntu is Ufw and stands for &quot;Uncomplicated Firewall&quot;. It was developed to ease ip-tables firewall configuration, and provides a user friendly way to create an IPv4 or IPv6 host-based firewall.
Ubuntu already has a very good tutorial on how to use Ufw which your can find [url=https://help.ubuntu.com/8.04/serverguide/C/firewall.html]here[/url]. I only tried to make it a bit clearer for you using some examples and the port numbers listed. Happy configuring!

[u][b]1. Start Ufw.[/b][/u]
Ufw by default is initially disabled. So it needs to be enabled on first use.
[code]sudo ufw enable[/code]
If you want to disable it again, use this command:
[code]sudo ufw disable[/code]
By default, Ufw denies all incoming traffic but allows all outgoing traffic, so you will need to open the ports you want to allow. Check your applications and which ports will need to be opened. 

[u][b]2. Port numbers.[/b][/u]
If you don&#39;t have a clue which port is used for which application, just take a look in the  [url=http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers]port list[/url]. 
Most common ports used are:
[code]21: File Transfer Protocol (FTP)
22: Secure Shell (SSH)
23: Telnet remote login service
25: Simple Mail Transfer Protocol (SMTP)
53: Domain Name System (DNS) service
80: Hypertext Transfer Protocol (HTTP) used in the World Wide Web
110: Post Office Protocol (POP)
119: Network News Transfer Protocol (NNTP)
137: Netbios Name Service (Used by Samba)
138: Netbios Datagram Service (Used by Samba)
139: Netbios session service (Used by Samba)
143: Internet Message Access Protocol (IMAP)
161: Simple Network Management Protocol (SNMP)
443: HTTP Secure (HTTPS)
445: Microsoft-DS SMB file sharing (Samba)[/code]

[u][b]3. Allow incoming traffic.[/b][/u]
To allow traffic for SSH to your server you need to open port 22. 
there are serveral ways to do this. The first option is adding the port number:
[code]sudo ufw allow 22[/code]
Another way is to add the service using the application name:
[code]sudo ufw allow OpenSSH[/code]
To see what applications are available on your system, you need to enter this command:
[code]sudo ufw app list[/code]
Depending on what applications are installed and enabled you will get a list containing all available application names, for example:
  Apache
  Apache Full
  Apache Secure
  Bind9
  OpenSSH
  Samba

Adding Apache will allow all incoming traffic to port 80, adding Apache Secure will allow all incoming traffic to port 443 for HTTPS,...

If you have samba installed you could allow all incoming traffic by adding: 
[code]sudo ufw allow 137
sudo ufw allow 138
sudo ufw allow 139
sudo ufw allow 445[/code]
Or you can simply allow all incoming traffic to Samba using:
[code]sudo ufw allow Samba[/code]
Or if you only want to allow incoming traffic from hosts within the local network (assuming your IP addresses are in the 192.168.1.x range):
[code]ufw allow from 192.168.1.0/24 to any app Samba[/code]

[u][b]4. Deny incoming traffic.[/b][/u]
Deny incoming traffic to OpenSSH:
[code]sudo ufw deny 22[/code]
or 
[code]sudo ufw deny OpenSSH[/code]

[u][b]5. Removing rules.[/b][/u]
Deleting rules can be accomplished by:
[code]sudo ufw delete  [/code]
example, on how to delete deny rule for port 22:
[code]sudo ufw delete deny 22[/code]
or if given by application name:
[code]sudo ufw delete deny OpenSSH[/code]
or by rule number (look at &quot;6. Check the configuration - numbered view of all rules&quot;) :
[code]sudo ufw delete [/code]

[u][b]6. Check the configuration.[/b][/u]
To see the firewall status, enter:
[code]sudo ufw status[/code]
And for more verbose status information use:
[code]sudo ufw status verbose[/code]
This will give you the port numbers if you used the application names when adding rules.
It&#39;s also possible to get a numbered view of all rules
[code]sudo ufw status numbered[/code]
The numbers can also be used when removing rules (&quot;5. Removing rules - delete by rule number&quot;).

[u][b]7. Logging traffic.[/b][/u]
Logging traffic can be useful to recognise hacking attempts, but logging is disabled by default so you need to turn this on:
[code]sudo ufw logging on[/code]
To turn it off again, use:
[code]sudo ufw logging off[/code]
The firewall logs will show up in three different log-files in the standard log directory &quot;/var/log&quot;. Check them using the tail command:
[code]tail -f /var/log/messages
tail -f /var/log/syslog
tail -f /var/log/kern.log[/code]</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=12</guid>
			<pubDate>Thu, 18 Aug 2011 21:35:03 +0200</pubDate>
		</item>
		<item>
			<title>How to use Crontab in Ubuntu 10.04 LTS to automate tasks</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=11</link>
			<description>Sometimes you need to automate certain tasks that come with administrating a working server. All Linux variants such as Ubuntu have a built-in scheduler named Crontab that can take care of scheduling various tasks for you.

[u][b]1. How does it work?[/b][/u]
Let us take an example to see how a task is built up.
[code]* * * * * /usr/bin/php5 /var/www/script.php[/code]
In this example we let a PHP script run every minute. The first part with the asterisks is the time and date a task needs to be run, specified in six fields starting with minute, hour, day of month, month, day of week and followed by the command to be run at that interval (in this case the PHP script).

See below how to set a time and date for your task:
[code]*     *     *     *     *  command to be executed
-     -     -     -     -
|     |     |     |     |
|     |     |     |     +----- day of week (0 - 6) (Sunday=0)
|     |     |     +------- month (1 - 12)
|     |     +--------- day of month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)[/code]
Some examples of how to set up a time interval for your task:
[code]* * * * * #Runs every minute
*/5 * * * * #Runs at every 5 minutes
30 * * * * #Runs at 30 minutes past the hour
45 6 * * * #Runs at 6:45 am every day
45 18 * * * #Runs at 6:45 pm every day
00 1 * * 0 #Runs at 1:00 am every Sunday
00 1 * * 7 #Runs at 1:00 am every Sunday
00 1 * * Sun #Runs at 1:00 am every Sunday
30 8 1 * * #Runs at 8:30 am on the first day of every month
00 0-23/2 02 07 * #Runs every other hour on the 2nd of July[/code]
Special strings can also be used to run a task:
[code]@reboot #Runs at boot
@yearly #Runs once a year [0 0 1 1 *]
@annually #Runs once a year [0 0 1 1 *]
@monthly #Runs once a month [0 0 1 * *]
@weekly #Runs once a week [0 0 * * 0]
@daily #Runs once a day [0 0 * * *]
@midnight #Runs once a day [0 0 * * *]
@hourly #Runs once an hour [0 * * * *][/code]

[u][b]2. Add a task to Crontab[/b][/u]
Use the following command to open the crontab editor and start adding tasks:
[code]sudo crontab -e[/code]

[u][b]3. List all existings crontab tasks[/b][/u]
[code]sudo crontab -l[/code]

[u][b]4. Example.[/b][/u]
Below you find an example that I use to run DDclient to update my IP-address to DynDNS.org. The task is run every day at 4.45am.
[code]45 04 * * * /etc/init.d/ddclient restart[/code]
[quote][b]Note from Steve Holdoway ([url=http://www.linkedin.com/]LinkedIn[/url] &quot;Linux Users&quot; group):[/b] &quot;I think that the most import thing that you&#39;ve missed is that there is almost no environment set up for cron jobs. Especially, there is no $PATH set up, so you either need to set one up at the start of the script, or you need to explicitly use the path with every command - eg /bin/ls &quot;

[b]Answer: Steve is correct, so as Ubuntu describes in their documentation about Crontab (but wasn&#39;t mentioned here): 
1. &quot;It is recommended that you use the full path to the desired commands as shown in the above examples.&quot;
2. &quot;Depending on the commands being run, you may need to expand the root users PATH variable by putting the following line at the top of your crontab file:[/b] [code]PATH=/usr/sbin:/usr/bin:/sbin:/bin&quot;[/code] [/quote]</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=11</guid>
			<pubDate>Sun, 14 Aug 2011 17:37:19 +0200</pubDate>
		</item>
		<item>
			<title>Connect to a remote Microsoft Windows computer from Ubuntu</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=10</link>
			<description>You have many different ways to do this, the most known will be VNC I guess. But how do you connect to a Windows remote desktop from Linux without installing VNC server on the Windows computer? It can be accomplished by using &quot;rdesktop&quot;. It&#39;s a remote desktop client like the one in Windows, but then for Linux instead. You do need to activate the remote desktop server on the windows side for it to work, you can find all information on how to do this [url=http://windows.microsoft.com/en-US/windows-vista/Remote-Desktop-Connection-frequently-asked-questions]here[/url].

[b][u]1. Installing the remote desktop client in Ubuntu.[/u][/b]
install remote desktop with following commands:
[code]sudo apt-get install rdesktop[/code]
And if you want the graphical frontend, install tsclient too:
[code]sudo apt-get install tsclient[/code]

[b][u]2. Starting a remote dektop connection from the command line.[/u][/b]
Use following command, replace the  with the one of the Windows computer you want to connect to:
[code]rdesktop [/code]

if you use another port than the standard one (3389) use following command:
[code]rdesktop :[/code]

[b][u]3. Available options.[/u][/b]
-u: user name
-d: domain
-s: shell
-c: working directory
-p: password (autologin)
-n: client hostname
-k: keyboard layout (hex)
-g: desktop geometry (WxH)
-f: full-screen mode
-b: force bitmap updates
-e: disable encryption (French TS)
-m: do not sendmotion events
-l: do not request license

Usage:
[code]rdesktop [options] server[/code]

If you want to connect to the console use -0 after or before the ip address:
[code]rdesktop  -0[/code]</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=10</guid>
			<pubDate>Fri, 12 Aug 2011 14:33:34 +0200</pubDate>
		</item>
		<item>
			<title>How to setup a fileserver with Samba on Ubuntu 10.04 LTS</title>
			<link>http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=9</link>
			<description>Having a file server at home is very useful if you want share documents across multiple computers. 
You can set-up multiple shares for music, films, documents... It could even be very useful if you login from multiple computers in your local network to centralise your home directory and those of other users too!

This article will explain how to set-up a basic working Samba file server with Ubuntu 10.04 LTS. You will need a working Ubuntu 10.04 LTS server to start with of course!

[u][b]1. Installation.[/b][/u]
Update your package manager and install Samba:
[code]sudo apt-get update
sudo apt-get install samba smbfs[/code]
Follow the default prompts to install Samba.

[u][b]2. Create the directory to share.[/b][/u]
Before changing anything in the Samba configuration, you should create the directories that you want to share. We will create a music share which all users can use:
[code]sudo mkdir -p /home/shares/music[/code]
We need to change the owner to the &quot;users&quot; group:
[code]sudo chown -R root:users /home/shares/music/[/code]
Make the directory writeable for all users:
[code]sudo chmod -R ug+rwx,o+rx-w /home/shares/music/[/code]

[u][b]3. Add and manage users and groups.[/b][/u]
This command will create a new Linux user with a home directory and password.
[code]sudo adduser [/code]
Follow the default prompts to complete the process. You can add as many users as you want like this, just replace the  with the desired username in the commands. Since our group is named &quot;users&quot; we will need to add our new user to that groupname! In this example we will add user &quot;dave&quot; to the &quot;users&quot; group
[code]sudo adduser dave users[/code]
If you want to create other groups for other shares you need to use this command:
[code]sudo addgroup [/code]
Now, Samba uses a separate set of passwords than the standard Linux system accounts (stored in /etc/samba/smbpasswd), so you will need to create a Samba password for each user you have added with this command:
[code]sudo smbpasswd -a [/code]
You can use the same password as you have used when creating the user if you like, or you can use a different password which is more secure.

Go to [url=http://help.ubuntu.com/community/AddUsersHowto]http://help.ubuntu.com/community/AddUsersHowto[/url] for more information on how to add and manage user accounts.

[u][b]4. Configuring Samba.[/b][/u]
The configuration file is located in /etc/samba/smb.conf, but before editing we should create a copy as backup!
[code]sudo cp /etc/samba/smb.conf /etc/samba/smb.backup.conf[/code]
Now we are safe to edit the Samba configuration for our needs:
[code]sudo nano /etc/samba/smb.conf[/code]
Find the line called &quot;workgroup = WORKGROUP&quot; (without the quotes), remove the &quot;;&quot; at the start of the line and change the workgroup to the workgroup name you use in your home network. For example
[code]workgroup = EXAMPLE[/code]
Next find the line &quot;security = user&quot; (without the quotes) and remove the &quot;;&quot; at the start of the line. This requires clients to supply a username and password to connect to shares (The user name of the Linux account and the matching samba password you have created).
Now we will add the directory that needs to be shared by Samba. In this example we use the directory &quot;music&quot; which we have created earlier.
[code][Music]
  comment = Our digital music collection
  path = /home/shares/music
  valid users = @users
  force group = users
  create mask = 0660
  directory mask = 0771
  writable = yes
  browsable = yes[/code]
Let&#39;s take a moment to explain all parameters:
1. [url=http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#COMMENT]comment[/url]: this is used to give a description about the share.
2. [url=http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#PATH]path[/url]: the actual path to the directory you want to share.
3. [url=http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#VALIDUSERS]valid users[/url]: add users or groups that can have access to the share. separate by space (For example adding only certain users &quot;valid users = user1 user2 user3&quot; or multiple groups &quot;valid users =@group2 @group1&quot; in this case we use only the group users &quot;valid users = @users&quot;).
4. [url=http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#FORCEGROUP]force group[/url]: This specifies a UNIX group name that will be assigned as the default primary group for all users connecting to this service. This is useful for sharing files by ensuring that all access to files on service will use the named group for their permissions checking. Thus, by assigning permissions for this group to the files and directories within this service the Samba administrator can restrict or allow sharing of these files.
5. [url=http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#CREATEMASK]create mask[/url]: sharing security level for the files.
6. [url=http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#DIRECTORYMASK]directory mask[/url]: sharing security level of the directory.
7. [url=http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#WRITEABLE]writeable[/url]: used to set the share writeable or readonly (you can use the parameter &quot;read only&quot; instead if you like for example: read only = yes)
8. [url=http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#BROWSEABLE]browseable[/url]: This controls whether this share is seen in the list of available shares in a net view and in the browse list.

For a more detailed explanation about all usable parameters, click [url=http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html]here[/url].

Finally, restart the samba services to enable the new configuration:
[code]sudo restart smbd
sudo restart nmbd[/code]

[u][b]5. Testing Samba.[/b][/u]
To test if your configuration works, use this command:
[code]sudo testparm[/code]
If no syntax errors show up, you are good to go.
Test on another computer if your Samba &quot;music&quot; share is reachable, enter your Linux username and your Samba password to connect to the share.

For a tutorial on how to connect your Samba share (network drive) in Windows XP, check [url=http://support.microsoft.com/kb/308582]this[/url] Microsoft support article. For a tutorial on how to map your Samba share (network drive) in Windows 7, check [url=http://windows.microsoft.com/en-US/windows7/Create-a-shortcut-to-map-a-network-drive]this[/url] article.</description>
			<guid isPermaLink="true">http://www.geoffke.be/index.php?pagina=nieuws&amp;artikel=9</guid>
			<pubDate>Fri, 12 Aug 2011 17:38:33 +0200</pubDate>
		</item>
	</channel>
</rss>
