Tuesday, May 26, 2015

IP port forwarding from source machine to destination on port 88. Please give the below rules

iptables -t nat -A PREROUTING -p tcp --dport 88 -j DNAT --to-destination
iptables -t nat -A POSTROUTING -p tcp -d --dport 88 -j SNAT --to-source
iptables -t nat -A PREROUTING -p udp --dport 88 -j DNAT --to-destination
iptables -t nat -A POSTROUTING -p udp -d --dport 88 -j SNAT --to-source
iptables -t nat -L -n
service iptables save
service iptables restart

Monday, November 10, 2014

Install VNC viewer on Centos 5.X machines

yum groupinstall "GNOME Desktop Environment"

yum install vnc*

Add this line at the end of /etc/sysconfig/vncservers

VNCSERVERS="5:root" VNCSERVERARGS[2]="-geometry 800x600 "

Login as user and set vnc password :

vncpasswd command :


create file xstartup under .vnc of home directory and give 777 permission

Add the below lines in xstartup file

# Uncomment the following two lines for normal desktop:
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
        eval `dbus-launch --sh-syntax –exit-with-session`
        echo "D-BUS per-session daemon address is: \
exec gnome-session