Opening ports using iptables

Screenshot Firestarter: Das Logfile von iptabl...

Image via Wikipedia

To open a port by using iptables you can use the iptables command, assume for example that you want to open port 25, you have to issue on the shell the following command

iptables -I INPUT -p tcp –dport 25 -j ACCEPT

where -I instruct to not add the rulle after the deny all rule avoiding to not be checked by iptables. At the end you have to save your changes with

service iptables save

and restart the service with

service iptables restart

However you can also edit directly the configuration file that in CentOS is in /etc/sysconfig/iptables

Securing SSH

This is a useful link on how to secure ssh using for example client certificate authentication.

Installing Java on CentOS 5.5

Trying to use the standard java distribution from Oracle (….Sun was acquired from Oracle…) could be a little confusing so I just link another blog were you find described the adopted solution for CentOS 5.2 but that is applyable also to CentOS 5.5.

CentOS 5.5 How to export X11 Display

It was a messy to try to export the display to a remote host. Typically it is just matter to use command like xauth <hostname> and set the DISPLAY environment variable properly or better to  use ssh forwarding. On Putty and TeraTerm we need just to enable a check instead from a linux shell you can use:

ssh -X -l username hostname

where the -X will perform the magic…check also for the -Y option)…However this on CentOS 5.5 doesn’t work!!!.
This is caused by a bug ( So to avoid you to spend time finding this bug simply you just need to install the xorg-x11-xauth package.
So to be simple type on the shell:

yum install xorg-x11-xauth