guy labs guy labs

How to install fish shell in Ubuntu 13.04

Linux
/by
I used the fish shell for some time now and I'm really happy with it. The highlighting, the command completion etc. are great. Today I want to show you how to install it and use it as default shell in Ubuntu. Ok let's start by installing the fish package from the Ubuntu repository with the following command: If you want the newest version you can go to the developer website and download the newest .deb file for Ubuntu. Next we need to set fish as the default shell. Execute the following command, log out and login again and when you now open a shell it should show the fish shell. It's worth read the documentation about the fish shell because it's very powerful and has a lot of useful features you surely dreamed of. ...

How to fill a hard disk with zeros

Infrastructure
/by
This short how to shows you how you are able to fill a hard disk with zeros, such that the data can't be restored anymore. For this we use the good old dd command (https://en.wikipedia.org/wiki/Dd_(Unix)). Ok let's start by mounting the hard disk you want to erase. Then execute the following command to see which file system you want to erase: Ok after you have the desired file system (something like /dev/sdb) you need to execute the following command to fill the hard disk with zeros: This will take a while and because you don't get any output on how long it will take you can use the pv command (http://linux.die.net/man/1/pv). This tool will show a progress of the data going through the pipes you define. To use it we need to first install it: And now execute the following command to have a dd command with a progress bar: Replace the placeholder with the size of your hard disk in GB such that pv can calculate the remaining time for the process. Ok that was the short how to about zeroeing out a hard disk. Happy erasing! ...

Cisco ISA550W Review

General, Infrastructure
/by
Some month's ago my cheap Thomson WLAN VOIP router, which I got from my ISP, just stopped working and I needed something stable and secure. I searched a lot, read a lot of reviews until I found the ISA550W from Cisco. It had everything which I needed: Gigabit Ethernet 802.11b/g/n WLAN Integrated security appliance (ISA) And it didn't cost that much (around 360$) like a real business hardware firewall (1000$ +). There is also the greater brother of the ISA550W the ISA 570W, which just has better performance, more ports and throughput than the ISA550W, but for me the throughput was enough. Ok here now the specifications: Firewall Throughput 200 Mbps IPsec VPN Throughput 75 Mbps Anti-virus Throughput 50 Mbps IPS Throughput 60 Mbps UTM Throughput 45 Mbps Maximum Connections 15000 IPsec VPN Site-to-Site Tunnels 25 IPsec Remote Access Tunnels 10 SSL VPN Tunnels 10 Total Interface 7 GE WAN Interface 2 GE LAN Interface 6 GE WLAN (802.11b/g/n) yes DMZ Port Up to four The detailed specs you can get here and the full administration guide here. So I bought it right away and started configuring. First of all I must say that you can configure nearly everything you can imagine. (Especially when you are used to a silly Thomson router admin interface) I didn't had any problems yet with this router, but the only annoying thing is, that the security updates are just valid for one year, and then you need to renew the subscription to get updates for the anti-virus, IPS etc. Today I use the IPsec VPN, anti-virus, IPS and the standard network configs for WLAN, port forwarding etc. which all...

Avahi and unicast domains .local

Linux
/by
Today I want to tell you something about the .local domains when you use Avahi. At edorasware we use vSphere from VMWare to manage our virtual machines. For accessing it we need to connect first to the local network via VPN and then connect to the vShere server. Inside the vSphere application you can connect yourself to the console of each VM with a browser plugin. But this didn't work because we use the .local domains for the VM's inside the local intranet. To resolve this issue I needed to open the file /etc/nsswitch.conf and replace the following line with this one here: But there are other ways to fix that: http://avahi.org/wiki/AvahiAndUnicastDotLocal What I also saw is that when I connect to the SSH daemon via VPN it connects a lot faster. I hope this helps someone...

How to convert a SVN repository to GIT in Linux

Development, Linux
/by
Today we want to convert a SVN repository to a GIT repository. I did the same conversion at edorasware too. What you need is direct access (SSH access to the server where the SVN repository lies) to the SVN repository which you want to convert and have GIT installed on that server. If you do this on a production SVN repository you need to tell all developers to stop committing while you are doing the conversion to prevent an inconsistent state of the GIT repository. Let's start by creating a dump of the SVN repository. (be sure you have enough disk space) Browse to the repository and execute the following command: Now we have a dump of the repository which you can copy into a temporary folder where the conversion takes place. Next we create an empty SVN repository and load the dump into this repository. Execute the following commands to do this: This process leaves the original SVN repository intact such that you can go back to SVN if something happens while converting. Next we need to download the svn2git tool which was used to convert the SVN repositories from the KDE project to GIT. Execute the following commands to clone the GIT repository: Now we need to install some dependencies in order to make the svn2git executable. Install the libsvn-dev dependency and qt4. In ubuntu you would execute the following commands: After the installation browse to the svn2git folder and execute the following commands to make the executable: After this process you have the svn-all-fast-export executable inside the...

How to install ownCloud 5 manually on Ubuntu 13.04 with Apache 2

Linux
/by
Today we want to install ownCloud such that we can host everything at home and it is under your control. You can check the features at https://owncloud.org Ok first step is to download the ownCloud distrubution to your server and extract it in your web directory. (Normally inside /var/www) You need to have an Apache HTTPD running. Now you need to install some php dependencies which are needed by ownCloud. To do this execute the following commands: Next you need to ensure that 'AllowOverride' is set to 'All' in the 'Directory /var/www' section of your virtual host file. This is usually in '/etc/apache2/sites-enabled/000-default'. Update 23.11.2013: If you have Apache version 2.4.3 or later (default in Ubuntu 13.10) installed you need to add the following to the /var/www section of your virtual hosts file (which now ends with the .conf extension): Next we need to enable some Apache 2 mods with the following commands: Now open the browser and connect to your server and add '/owncloud' to the URL. Follow the installation instructions and select a database. I use PostgreSQL but you can also use MySQL or SQLite (file based database). But for larger installations you should use PostgreSQL or MySQL. After the installation is finished, you can test your ownCloud instance. If you need more documentation or need support goto http://doc.owncloud.org Thats all on how to install ownCloud on your own...

Mount FTP directory with TLS and backup files in Ubuntu 13.04

Linux
/by
This howto shows you how we can download FTP files over TLS and backup them automatically. I have several Wordpress websites which are running on remote servers where I just have FTP access. I installed a Wordpress plugin (http://wordpress.org/plugins/backwpup/) which makes daily backups and now I want to store them on my server at home. First we need to install curlftpfs by executing the following command: Next we need to test if the FTP mount works with curlftpfs. To test this execute the following command: If your username or password contains special characters you need to convert them. For example you need to convert an @ to %40. You can use this converter: http://www.w3schools.com/tags/ref_urlencode.asp If you get the following error: You need to download the server certificate with the following command: and add it to the options of curlftpfs: Now the mount should work and if you browse into the /mnt directory you should see the files which are in the specified directory on your FTP server. Update 06.03.2014: After a comment on this post about how to hide the password from the process list I add the following addition from the FAQ of the curlFtpFS project website: You can put the user and password in a .netrc file in the home directory of the user that executes CurlFtpFS. It can have 600 permission. It's still clear text but at least is not accessible by all. The format is: Ok now it's time to create a simple backup script which copies the backups to a local folder...

Install ClamAV antivirus in Ubuntu Server and Client

Linux
/by
In this how to we will install ClamAV antivirus on an Ubuntu client and a server. First we will install it on the client with the following command: This will install ClamAV and the GUI frontend ClamTK. You can configure daily scans and virus definition updates inside this tool. To install ClamAV on an Ubuntu server we start by installing ClamAV and the daemon by executing the following commands: Next we need to reconfigure the ClamAV base package, update the virus definitions and start the daemon. Execute the following commands: Next we need to create a shell script which scans a specific directory and sends an email if a virus is found. Place that shell script inside the user home of the root user or somewhere else. I placed it inside /home/clamav. Ok now create a file with the command 'sudo vi clamav-scan.sh' and enter the following content: Next we need to make the file executable with the following command: After that we add this file as a cronjob which executes every night at 3am: Substitute the {PATH-TO-SCRIPT} placeholder with the path where the clamav-scan.sh script is stored. Next we infect the folder you want to scan with the EICAR test virus. For that create a text file and add the following content to it: Store it and then run the created clamav-scan.sh to see if the virus is found and the mail is sent. After everything worked as it should, delete the test virus text file. But be aware: The clamav-scan.sh script identifies the viruses and doesn't delete them, that has to be done manually. Ok...

Create a software RAID1 with mdadm on an active Ubuntu 13.04 till 16.10 hard drive

Linux
/by
Today we want to create a RAID1 array with an active Ubuntu 13.04 till 16.10 hard drive. I installed my server without a RAID array on a single hard drive. And now, after spending a lot of hours configuring it, I want to create a RAID1 array to have a security if one of the hard drives fail. Create a simple RAID1 array is easy with mdadm, but creating it with a hard drive that has data on it isn't that simple. I created the following howto with the help of this older blog post about the same problem: http://feeding.cloud.geek.nz/posts/setting-up-raid-on-existing Use this article with caution because this is the solution for my machine and I don't know if it works on other machines, but I gave my best to test everything in a virtual machine and on my server with the UEFI boot mechanism. Also create a backup of your hard disk first: Create a CloneZilla disk image Ok let's start and we first need to install the following packages: If you havent already installed postfix, set the option 'no configuration' for the postfix installation dialog. First attach your new hard drive (best to have one with the same size or bigger) and then execute the following commands to copy the partitions of /dev/sda to the second drive (in my case /dev/sdb): If you have a GPT partition table you need to install gdisk and copy the partition table with the following commands: The first command here copies the partition table from /dev/sda to...

guy brûlé: my music productions

Personal
/by
Hi, today I want to share my music productions with you. I've produced the tracks back in 2011. Comments are welcome  :grin: If you want to listen to sets please go to my soundcloud account: https://soundcloud.com/guybrule Cheers and happy...