VMware player 6 and Ubuntu 14.04 (Linux Kernel 3.13)

I’ve installed Ubuntu 14.04 Beta 2 and found that VMware didn’t work because the vmnet module wasn’t able to be compiled. After some research I found some posts about this problem, the VMware vmnet module source has to be patched in order to compile. This is based on the information I found at here but there are more similar sources.

This is the patch code:

205a206
> #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
206a208,210
> #else
> VNetFilterHookFn(const struct nf_hook_ops *ops, // IN:
> #endif
255c259,263
< transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
---
> #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
> transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
> #else
> transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
> #endif

Now to apply the patch, execute the following commands:

cd /usr/lib/vmware/modules/source
tar -xvf vmnet.tar
patch vmnet-only/filter.c < ~/vmnet313.patch
patch vmnet-only/filter.c < /home/fgomes/vmnet313.patch
tar -uvf vmnet.tar vmnet-only
rm -r vmnet-only

After this, start VMware player, it should be able to compile vmnet now!

Share in top social networks!
Posted in Linux, OpenStudio | Leave a comment

How to block Skype on your network using IPTABLES

One way of blocking Skype on a network is to block the registration process. After the registration the communication between peers is done in several different ports and it difficult to define rules to block it.
Using a OpenWRT router and a previous list of servers I found googling, I was able to find the servers that are used in the login / registration process, and blocking the access to them I was able to block Skype to every user in the router LAN, or even to a specific user in the LAN.

Currently I have added these rules to the IP tables and was able to effectively block Skype in my network:

iptables -I FORWARD -d 63.245.217.0/24 -j DROP
iptables -I FORWARD -d 64.4.23.0/24 -j DROP
iptables -I FORWARD -d 65.54.167.0/24 -j DROP
iptables -I FORWARD -d 65.55.223.0/24 -j DROP
iptables -I FORWARD -d 91.190.216.0/24 -j DROP
iptables -I FORWARD -d 111.221.74.0/24 -j DROP
iptables -I FORWARD -d 111.221.77.0/24 -j DROP
iptables -I FORWARD -d 157.55.130.0/24 -j DROP
iptables -I FORWARD -d 157.55.133.0/24 -j DROP
iptables -I FORWARD -d 157.55.235.0/24 -j DROP
iptables -I FORWARD -d 157.55.56.0/24 -j DROP
iptables -I FORWARD -d 157.56.52.0/24 -j DROP
iptables -I FORWARD -d 157.56.116.0/24 -j DROP
iptables -I FORWARD -d 194.165.188.0/24 -j DROP
iptables -I FORWARD -d 195.46.253.0/24 -j DROP
iptables -I FORWARD -d 213.199.179.0/24 -j DROP

These servers (networks) are mostly from MSFT (since they bought Skype), and some are still from Skype. They might vary depending on the country, so if blocking these servers is not enough for you, please run the following command to locate which server is being used in your case:

cat /proc/net/nf_conntrack | grep 12350

If you have any results from the above command, you should add this server network to the above list (and please post it here to update the list above).

If you want only to block the Skype traffic for a specific user in your network, you should add the following information in each of the above lines, just after FORWARD keyword:

-s IPADDRESSTOBLOCK

Please replace IPADDRESSTOBLOCK with the IP address you want to block.

These rules should be used on a router, since they use the FORWARD chain. If you want to block traffic to the machine where IPTABLES is running, replace the FORWARD chain by the OUTPUT chain (just change the FORWARD keyword by the OUTPUT keyword in all the above lines).

Please pay also attention because we are blocking a lot of server IP addresses, so any other service that might be provided by the servers on these networks will also be blocked. In my experience this wasn’t a problem. I still am able to use many other services from MFST, like SkyDrive, etc. but your mileage may vary :-)

Share in top social networks!
Posted in Linux, OpenStudio | Leave a comment

Install Polipo Proxy server on Centos

As you can see in this previous topic, I needed to install Polipo Proxy on a Centos 5 server. Since the Polipo package is not available on the plain Centos 5 server installation I had to add first the EPEL repository (see the previous topic). After that, I installed the Polipo Proxy:

yum install polipo
nano /etc/polipo/config

Just uncommented the proxyAddress line and change it to the correct IP address of the server:

proxyAddress = "192.168.0.1"

Since I want to have the proxy running in a port different from the default port, I add this line:

proxyPort = 3128

In the allowedClients put all the clients that are allowed to use the proxy. You can use IP ranges like in the example, and could separate the IP addresses using commas.

allowedClients = 127.0.0.1, 192.168.0.0/24

In the example file the allowedClients had the IP addresses between quotation marks, but it didn’t work that way, it should be as stated above, without any quotation mark.

After configuring the polipo, it is just necessary to start it:

/etc/init.d/polipo restart

If the configuration is good it should start!

Share in top social networks!
Posted in Linux, OpenStudio | Leave a comment

How to add EPEL repository to Centos

I needed to add the EPEL repository (Extra Packages for Enterprise Linux) in order to install some packages not available on plain Centos 5 server installation (like the polipo proxy). Based in what I found here, this is what I did:

wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-5*.rpm

For a Centos 6 there are some differences:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6*.rpm

You now have much more packages available to install on your server!

Share in top social networks!
Posted in Linux, OpenStudio | Leave a comment

How to install the latest Chrome browser on Ubuntu

To install the latest Chrome browser (development version, with minimal testing), go the this url:

https://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb

Accept the EULA to download the .deb package (in this case for the i386, to download to 64 bit architecture or the beta version instead of the development version, go to the Chrome Release Channel to choose the right package).

After downlaoding, install the package

sudo dpkg -i google-chrome-unstable_current_i386.deb

This will install the most recent development version (today is the 27.0.1423.0-r184590). It asked me for libxss1, don’t know if it was removed when I remove Unity, or if it is a new requirement from Chrome, I simply installed it by running the following command before installing Chrome again:

sudo apt-get install libxss1

Now you have a bleeding edge Chrome! The development version is updated more or less weekly, and at least minimally tested.

Share in top social networks!
Posted in OpenStudio | Leave a comment

Replace Unity desktop with Cinnamon on Ubuntu 12.04 (and Ubuntu 13.10)

I did never get used to Unity, and I think Cinnamon is getting a very good desktop, so here is how I replace Unity with Cinnamon on Ubuntu 12.04 (based on this tuturial):

First add a repository with Cinnamon:

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable

Then update the package list and install Cinnamon:

sudo apt-get update
sudo apt-get install cinnamon

After finishing the installation, reboot the system and choose Cinnamon on the Login screen

You should see now a desktop with Cinnamon. To remove Unity now execute the following command:

sudo apt-get remove gir1.2-unity-5.0 indicator-application indicator-appmenu indicator-datetime indicator-messages indicator-power indicator-sound libindicator7 libnux-2.0-0 libunity-2d-private0 unity unity-2d unity-2d-launcher unity-2d-panel unity-2d-places unity-2d-shell unity-2d-spread unity-asset-pool unity-common unity-lens-applications unity-lens-files unity-lens-music unity-lens-video unity-place-applications unity-scope-musicstores unity-scope-video-remote unity-services

If you reboot or logout/login you should no longer have the possibility of choosing Unity.

Update for Ubuntu 13.10

I’ve tested the above procedure with Ubuntu 13.10, installing Cinnamon 2.0.6 with success:

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon

Now just logout and login again choosing Cinnamon instead of Unity.

Share in top social networks!
Posted in Linux | Leave a comment

How to install VMWare Tools on Ubuntu Server (command line only)

When we install Ubuntu Server on a VMWare Virtual Machine and choose to add the VMWare tools, there is no desktop where the tools appear to be installed, so this is a way to install VMWare tools on a command line only installation.

On VMWare choose Instll VMWare Tools. On the guest OS (Ubuntu Server on my case) we have first to mount the virtual CD with the tools:

sudo mount /dev/cdrom /media/cdrom

Then extract the CD contents to the tmp dir

tar xzvf /media/cdrom/VMwareTools-xxxxx.tar.gz -C /tmp/

Now execute the tools installer (-d options uses all the default parameters, to choose them manually do not use the -d option):

cd /tmp/vmware-tools-distrib/
sudo ./vmware-install.pl -d

If there is no GCC installed on the guest OS the VMWare tools configuration will fail, so GCC should be installed first (you could install it and run again the vmware-install.pt script if it has failed because of the missing GCC)

sudo apt-get install gcc

Run again the installer if it has failed because of the missing GCC:

cd /tmp/vmware-tools-distrib/
sudo ./vmware-install.pl -d

Share in top social networks!
Posted in Linux | Leave a comment

Ubuntu Server 12.04 LTS – Using English language for the installation and other location and language for the keyboard

When I install Ubuntu Server 12.04 LTS (or 12.10, it has the same behavior), I choose the English language for the system, but since I work with computers with a Portuguese keyboard, I need to choose the Portuguese keyboard during the setup process, so after choosing the English language, I choose Other/Europe/Portugal for the Location. With this kind of Language / Location combination, Ubuntu Server setup asks to configure manually the Locale since there is no Locale defined for the Language / Location combination entered. In this case, and since i want it to work correctly in English, I choose always en_US.UTF-8, like this:

locale

Hope that this could be useful!

Share in top social networks!
Posted in Linux | Leave a comment

How to install Oracle Java 7 on Ubuntu and Mint Linux

There are several different ways, this one is simple and has worked flawlessly for me many times, so I hope it can help you installing Oracle Java 7. This is based on this WEBUPD8 procedure. The tests I’ve made were done on Ubuntu 12.04 and 12.10, and Mint Mate 14, but according to the WEBUPD8 post it should work from Ubuntu 10.04 up to the coming 13.04, and the corresponding Mint versions. Ok, let’s do it:

sudo add-apt-repository ppa:webupd8team/java

If this command fails reporting that add-apt-repository is missing, please run this command before the previous one:

sudo apt-get install python-software-properties

Then do the following commands

sudo apt-get update
sudo apt-get install oracle-java7-installer

After finishing the installation execute the following command in order to verify that the result is the expected:

java -version

You should see something like this:

java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

The version number might change slightly depending of when you do it, this result was obtained today (Feb 1 2013). If the version is not the correct one (1.7) or if you are seeing OpenJDK there, please run the following additional command to select Oracle Java as the active Java stack:

sudo update-java-alternatives -s java-7-oracle

To uninstall it, just run:

sudo apt-get remove oracle-java7-installer

I hope it could be usefull, please comment with questions or corrections.

Share in top social networks!
Posted in Linux | Leave a comment

New OpenStudio home

Finally I’ve made the change I wanted to do for a long time, change the server where I have OpenStudio and other sites hosted. In the meantime I have taken this oportunity to change also the CMS I was using, from Joomla to WordPress – the site is very simple and can be easily handled by the WordPress functionalities and for me it is easier to configure and administrate it using WP.

If during the migration process something got wrong please let me know. I am still correcting some minor glitches, and hope the major glitches are all corrected by now :-)

Share in top social networks!
Posted in OpenStudio | Tagged , | Leave a comment