Check your ports before you install the application

I have come across situations where it was necessary to check the ports before even installing an application to see if firewall is open or if no other application is already using the port.


On Linux environments this can be done using command ln:

Use yum or zypper or apt-get to install the tool:


Now simulate your port and test:



On windows I did not find a ready-made way to do the same. So designed my own, with some help from internet.

No installation required and it is version independent. Just download and run it from below link:

Simulate Port on Windows


Unzip the file to your desktop.

Double click to execute the file:



If prompted allow firewall access.


And you are ready to test.


Once you are connected, you get a message in your simulator:


Note: After the test is done end the test process from your task manager. Otherwise the port will be kept occupied.



Configure VNC Or Xrdp server on a RHEL VM

On a newly created RHEL VM/EC2 instance graphical interface is not normally configured.

In the below blog, we will discuss about configuring the VNC server on a RHEL machine.

XRDP configuration is discussed at the end of this blog post.

Elevate your user with root privileges.

Install the required packages using below command:

yum install tigervnc-server -y


Set VNC password for the client sessions


Make a note of password used.


Start a VNC session.


Note that you session number is 1.

Now to try to connect to your VNC session using a VNC client tool from you windows machine.

VNC uses port 59XX (where XX is the desktop instance number). In above case my instance number will be 5901. 

Make sure you have allowed this port on your cloud inbound security rule and also on the Linux firewall. 

After these changes, if you get a blank screen when connected to the session, check the run level of your system and follow the below steps:


GUI interface is not enabled in run level 3. Switch to run level 5 to enable the GUI mode.


You will need a server reboot for this change to take effect.

check the run level again after the reboot.


Now install the GUI server with the below command:


Once done you should be able to connect to the GUI screen using VNC viewer.


To configure XRDP, perform the below steps:

Download the RPM packages:

# rpm -Uvh

Note: Always use the updated URL.

Install the XRDP packages:

# yum install xrdp -y

Start XRDP service and make it persistent:

#service xrdp start

#chkconfig xrdp on

XRDP uses port 3389. 

Make sure you have allowed this port on your cloud inbound security rule and also on the Linux firewall.

Now you should be able to connect to your Linux machine using Microsoft Windows Terminal Services Client (MSTSC) from your windows machine.

Additional Notes for Ubuntu:

If you are not able to connect with XRDP, Execute following commands on Ubuntu:

Install xfce4

#sudo apt-get install xfce4

Add following lines to users .xsession file under home directory and comment out the rest of the line.