OpenVPN server and CentOS

OpenVPN is the de facto standard VPN free open source software; it is widely used, tested, well documented and also included in the CentOS repos (EPEL). .:. Server side configuration yum install openvpn easy-rsa dnsmasq When yum is done installing the required packages, copy the sample config file. cp /usr/share/doc/openvpn-*/sample/sample-config-files/server.conf /etc/openvpn Uncomment/edit the following lines in /etc/openvpn/server.conf: port 1194 proto udp dev tun ca ca.crt cert server.crt key server.key dh dh4096.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "redirect-gateway def1" push "dhcp-option DNS 10.8.0.1" keepalive 10 120 tls-auth ta.key 0 # This file is secret key-direction 0 tls-version-min 1.2 tls-cipher TLS-DHE-RSA-WITH-AES-256-CBC-SHA256 auth SHA512 cipher AES-256-GCM #comp-lzo # Disable LZO compression persist-key persist-tun status openvpn-status.log ;log openvpn.log # disable log, optional ;log-append openvpn.log # disable log, optional user nobody group nobody Now, create two folders easy-rsa/keys in /etc/openvpn and copy some files into them: …

Posted on

Logitech G500 and Linux

Despite not being a gamer at all I see having a decent mouse as an important thing, I spend 10 to 15 hours a day in front of my PC and probably for at least half of the time I’m using the mouse, so I don’t get why I should not have the best input peripherals on the market. My current mouse is a Logitech G500 (NP 910-001262), of course it being the best mouse on the market is an highly debatable thing since, along side with the keyboard, mouse choice is highly subjective. G500 is something you love or you hate, starting from the unusual scroll wheel, going to the sensor position to the strange side buttons there are a lot of uncommon things. This small write-up is not meant to be a review nor a guide, I would like it to be just a bunch of tips from someone who is using a G500 on a Linux box. First of all: this mouse has no angle snapping, or better, out of the box angle snapping is enabled (Logitech, why? seriously, none like angle snapping) but it can be disabled from drivers. Obviously drivers are available only for Windows (Logitech…) and I don’t seem to be able to change mouse settings from a virtual machine (VMware Workstation 9), anyway I didn’t put much time on this so it could be doable. So what I suggest is plug G500 in a physical Windows machine, install drivers and tune the settings, once you are done, save settings on G500 internal memory and plug it in your Linux machine. Once in Linux, which in my case is Fedora 18 and XFCE as DE, there are still acceleration issues which can be solved quite easily using xinput. – Someone report that G500 sensor is flawed and it has some kind of built-in acceleration, honestly I don’t see it but could be that I’m just used to it – …

Posted on

XRDP and CentOS 6

Yesterday’s night I installed a test machine to play with KVM and some other stuff, obviously the OS of choice is the trusty CentOS. I did a pretty minimal net-install but decided to install gnome desktop environment anyway because why not, not that it will be of much use, but still. Anyway, since the machine is an headless server it’s mandatory to be able to control it remotely, like the past 2 or 3 times, I installed XRDP expecting everything will be fine and working without any problem. And here is when I was wrong. It’s been quite a long time since the last time I installed XRDP somewhere, but I clearly remember it working flawless without any kind of manual configuration. I did the usual yum install xrdp, confirm the installation, bla bla bla, service xrdp start and both sesman and xrdp started with no problem. Then, when I went back to my workstation (Fedora 18 x64) and tried to connect to the server using Remmina Remote Desktop Client at first it seems to be working but once I typed user ID, password and press OK I got prompted the following error: …

Posted on

Linux Kernel 3.8.* – VMware failed to build vmci

Every time a new Kernel goes out there seems to be a new issue with VMware Workstation 9. Today I updated a couple of Fedora 18 boxes, applied the usual workaround (I wrote a post about it one month ago or so) which consists in ONE OF the following steps: ln -s /usr/src/kernels/_kernel_version_/include/generated/uapi/linux/version.h /usr/src/kernels/_kernel_version_/include/linux/version.h ### OR cp /usr/src/kernels/_kernel_version_/include/generated/uapi/linux/version.h /lib/modules/_kernel_version_/build/include/linux/ Rebooted and then issued the usual command (vmware-modconfig –console –install-all) to rebuild the needed VMware modules just to find out that it isn’t possible to rebuild the VMCI module. On the VMware official forum I found a thread (http://communities.vmware.com/message/2182440#2182440) in which a user provides a patch. Apply the patch is fairly simple: …

Posted on

Fedora 18: TRIM and luks

At a first glance enabling TRIM on a luks encrypted volume looks quite easy, and, as a matter of a fact it is. The shitstorm starts when trying to enable TRIM on the root volume, but, let’s go one step at a time. First of all, enabling trim on a regular not encrypted volume is pretty easy; just open the file <em>/etc/fstab</em> and add the flag <em>discard</em>. You may also want to add the flag <em>noatime</em> to prevent the OS from writing additional informations regarding last access date and such, it’s not strictly necessary but it will save the SSD’s cells some useless write operations. The fstab file should look like this (here only one row is reported): …

Posted on

File search in Thunar

Thunar 1.6.2 (the default XFCE file manager) doesn’t seems to provide any kind of built in search function by default. A good way to address this issue is use catfish (which is installed by default in Fedora 18), just open Thunar, go to Edit and then Custom Actions and add the following line: catfish –fileman=thunar –hidden –path=%f

Posted on

Samba 4, simple directory sharing

With Samba being the clusterfuck it is, every time a new version is released you have to expect something to be messed up. This time they added a bunch of new features like MS Active Directory support, too bad that now the simple directory sharing is broken/not working like it did before. Something like 1 year ago I wrote a small guide about how to setup a Samba share on Centos 6 and I used the same smb.conf file on more than 10 machines without any problem since yesterday, when I tried it on my fresh installed Fedora 18 (which uses Samba 4.0.0). First of all, in the “Standalone Server Options” is reported that “security” options “share and server” are deprecated; too bad I just used “share” to save me the hassle of setting up a new user and stuff even if I would like the directory to be fully accessible by everyone without any restriction. I tried it anyway with “security = share” but there was no way to make the folder accessible, when trying to access the Samba share I always got a popup in which I had to login. So, at the end of the story, like it or not, I had to setup a new user, create a samba user and edit the “smb.conf” file. …

Posted on

Fedora 18 and VMware Workstation 9

During the installation process of VMware Workstation 9 some modules need to be compiled but unfortunately Workstation 9.0.1 doesn’t seems to be able to find by itself the correct kernel headers directory. If kernel headers aren’t already installed, open the terminal and type as root: yum install kernel-*. Wait for the process to be completed and then: sudo cp /usr/src/kernels/kernel_version.fc18.x86_64/include/generated/uapi/linux/version.h /lib/modules/kernel_version.fc18.x86_64/build/include/linux/. This should do the trick. …

Posted on