Pages

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 172.26.14.174:88
iptables -t nat -A POSTROUTING -p tcp -d 172.26.14.174 --dport 88 -j SNAT --to-source 172.26.14.215
iptables -t nat -A PREROUTING -p udp --dport 88 -j DNAT --to-destination 172.26.14.174:88
iptables -t nat -A POSTROUTING -p udp -d 172.26.14.174 --dport 88 -j SNAT --to-source 172.26.14.215
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

#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# 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: \
        $DBUS_SESSION_BUS_ADDRESS"
fi
exec gnome-session