HOWTO: Use iptables with CentOS 7

Thanks to Rackspace Community for this nice howto.

Starting with RHEL 7 / CentOS 7, firewalld was introduced to manage iptables. As such, you will either need to use firewall-cmd commands or disable firewalld and enable iptables. If you prefer to use the classic iptables setup, then this article will show you how to do just that.

Pubblicato in IT, linux | Contrassegnato , | Lascia un commento

Get list of running processes on remote Windows machine

The tasklist /S <remotemachine> command will output a list of all running processes on remote machine.

Or better, in Powershell, you could use: get-process or get-wmiobject WIN32_PROCESS (gwmi is an alias for get-wmiobject)

If you want CPU usage in percentage, use gwmi Win32_PerfFormattedData_PerfProc_Process

To sort output by CPU usage

PS C:\> gwmi -Computername <remotemachine> Win32_PerfFormattedData_PerfProc_Process | sort PercentProcessorTime -desc| ft name, PercentProcessorTime, IDprocess -auto

Credits: at

Pubblicato in IT, powershell, windows | Contrassegnato , , | Lascia un commento

Install VMware tools in Linux guest (RedHat Enterprise Linux or Centos)

I often have to install VMware tools on linux guests, so I wrote down a very basic bash script to automate installation. You only have to:

  • copy-and-paste following lines into a text file on your Linux vm (let’s say
  • make it executable with chmod +x
  • fill out a few variables (VMWARE_VERSION, OS and ARCH)
    VMWARE_VERSION is the ESXi version. For example: 5.1latest, 5.5 or 5.0u1.
    OS is rhel5 or rhel6 (also for Centos)
    ARCH is the architecture option. For 32-bit is i386 and for 64-bit is x86_64.
  • run it with ./

Hope it helps!

yum -y install wget

rpm --import
rpm --import
cat <<EOF > /etc/yum.repos.d/vmware-tools.repo
name=VMware Tools
yum update
yum -y install vmware-tools-esx-kmods vmware-tools-esx-nox

Pubblicato in IT, linux, vmware | Lascia un commento

how to find dns device names from Citrix udadmin output

With udadmin.exe (a command line Citrix XenDesktop tool to find licenses usage data) when you list all licensed users and devices (with -list -a switches), devices show up in an 8-character alpha-numeric format, not real DNS device names.

Thanks to Quazi Imtiaz form Citrix forums ( i found that you have to use this powershell command

Get-BrokerDesktop -LicenseId "C8FC0276" | Select MachineName

where C8FC0276 is the id in udadmin output.

You get device dns name in the format Domain\VirtualDesktopName

Pubblicato in citrix | Contrassegnato , , , | Lascia un commento

What is the URL for a CentOS 6 netinstall?

When installing Linux Centos 6.x netinstall (minimal CD that downloads packages only on-demand), at the beginning of the setup, after network configuration, it prompts you for a “URL setup” (the address of a centos mirror to download installation from).


I usually use mirror located at (Switzerland). I suggest this mirror if in Europe.

Here are the links

for x64:

for x86:

Hope it helps!


Pubblicato in IT, linux | Contrassegnato , , , , , | Lascia un commento

How do I enable ownership of an external drive?

Open Disk utility, copy the name of the drive – ex: “MyBackup”
In Finder search and open terminal.
In terminal, it may ask for user name and password – enter them.
Copy and paste this:

sudo /usr/sbin/vsdbutil -a /Volumes/MyBackup

(Change the name from MyBackup to the actual name of the drive)
….it may ask for user name and password – enter them.

When you go back to Disk Utility and get info on your disk, it should have changed ownership status (Enable owner: yes)

Pubblicato in IT, mac | Contrassegnato , , , , | Lascia un commento

Vim Syntax highlighting for Apache Config Files

thanks Brad Montgomery for this!

Basically, Vim does syntax highlighting for apache files based on their path. To get vim to recognize the files in the apache_configs directory, you need to edit (or create) ~/.vim/filetype.vim and add the following:

au BufNewFile,BufRead ~/path/to/apache_configs/* setf apache
Pubblicato in IT, linux | Contrassegnato , , , | Lascia un commento