Posts

Showing posts from 2010

Configure VNC Server

vnc-server rpm is required [root@noisecover-dr ~]# rpm -ql vnc-server-4.1.2-14.el5_3.1 /etc/rc.d/init.d/vncserver /etc/sysconfig/vncservers /usr/bin/Xvnc /usr/bin/vncconfig /usr/bin/vncpasswd /usr/bin/vncserver /usr/bin/x0vncserver /usr/lib/xorg/modules/extensions/libvnc.so /usr/share/man/man1/Xvnc.1.gz /usr/share/man/man1/vncconfig.1.gz /usr/share/man/man1/vncpasswd.1.gz /usr/share/man/man1/vncserver.1.gz /usr/share/man/man1/x0vncserver.1.gz /usr/share/vnc /usr/share/vnc/classes /usr/share/vnc/classes/index.vnc /usr/share/vnc/classes/logo150x150.gif /usr/share/vnc/classes/vncviewer.jar

aureport --Sytem Report

[root@noisecover-dr Desktop]# aureport Summary Report ====================== Range of time in logs: 11/23/2010 16:44:11.849 - 12/15/2010 15:10:01.466 Selected time for report: 11/23/2010 16:44:11 - 12/15/2010 15:10:01.466 Number of changes in configuration: 11 Number of changes to accounts, groups, or roles: 10 Number of logins: 21 Number of failed logins: 53 Number of authentications: 84 Number of failed authentications: 30 Number of users: 3 Number of terminals: 22 Number of host names: 16 Number of executables: 12 Number of files: 0 Number of AVC's: 0 Number of MAC events: 0 Number of failed syscalls: 0 Number of anomaly events: 5 Number of responses to anomaly events: 0 Number of crypto events: 0 Number of keys: 0 Number of process IDs: 4172

Crazy Commands

1) If we want to know what ls and date command does in backgroup. strace -c /bin/ls 2) Server crash command $:(){:|:&};:

Explain escaping & quoting rules

Print Hello World in Perl

#!/usr/local/bin/perl -w print "hello world\n"; #\n for next line print "Davinder\n"; #END Output [root@Perl-scripts]# perl -w helloworld.pl hello world Davinder

How to install YUM server

Steps: 1) mkdir /RHEL/ISO/ -p 2) copy the CD's or DVD in /RHEL/ISO directory cp -rvf /media/RHEL_5.4\ i386\ DVD/* /RHEL/ISO/ 3) cd /RHEL/ISO/ 4) Install the Createrepo rpm rpm -ivh Server/createrepo-0.4.11-3.el5.noarch.rpm 5) cd /RHEL 6) createrepo . 7) yum list 8) vi /etc/yum.repos.d/rhel-debuginfo.repo -->edit it as below #[rhel-debuginfo] [rhel] name=Red Hat Enterprise Linux $releasever - $basearch - Debug baseurl=file:///RHEL/ enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release #name=Red Hat Enterprise Linux $releasever - $basearch - Debug #baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/ #enabled=0 #gpgcheck=1 #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 9) yum list 10) gpgcheck should be "0" so [root@Desktop]# grep -i gpg /etc/yum.conf gpgcheck=0 11) yum install vsftpd*

Proc file system

Proc File Sys Proc file system:- virtual file system contains real time system information /proc Contains diff files and directories depending on your system hardware. Few files and directories information /proc/buddyinfo :- contains information about memory fragmentation dma shows first 16 mb of memory and highmem containing info about ram above 4gb while normal contains information about ram b/w dma and highmem. /proc/cmdline :- contains information about parameters passed to kernel at boot time e.g ro root=/dev/VolGroup00/LogVol00 rhgb quiet 3 root is mounted as readonly on first logical vol on first volgroup rhgb means graphics graphics mode booting is on and quiet tell that kernal messages on boot time are surpressed and 3 is the default runlevel which is set in inittab file id:3:initdefault: /proc/cpuinfo :- displays full information about the processors proce

Proc file system

Proc File Sys Proc file system:- virtual file system contains real time system information /proc Contains diff files and directories depending on your system hardware. Few files and directories information /proc/buddyinfo :- contains information about memory fragmentation dma shows first 16 mb of memory and highmem containing info about ram above 4gb while normal contains information about ram b/w dma and highmem. /proc/cmdline :- contains information about parameters passed to kernel at boot time e.g ro root=/dev/VolGroup00/LogVol00 rhgb quiet 3 root is mounted as readonly on first logical vol on first volgroup rhgb means graphics graphics mode booting is on and quiet tell that kernal messages on boot time are surpressed and 3 is the default runlevel which is set in inittab file id:3:initdefault: /proc/cpuinfo :- displays full information about the processors proce

OpenSource Cloud computing website

http://socializedsoftware.com/2010/01/20/eleven-open-source-cloud-computing-projects-to-watch/

Hardening the TCP/IP stack to SYN attacks

http://www.symantec.com/connect/articles/hardening-tcpip-stack-syn-attacks

Netstat-- Network Interface

-sh-3.00$ netstat -i Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 103086960 0 0 0 11623173 0 0 0 BMRU lo 16436 0 117741 0 0 0 117741 0 0 0 LRU vmnet1 1500 0 0 0 0 0 5 0 0 0 BMRU vmnet8 1500 0 6 0 0 0 5 0 0 0 BMRU he MTU and Met fields show the current MTU and metric values for that interface. The RX and TX columns show how many packets have been received or transmitted error-free (RX-OK/TX-OK) or damaged (RX-ERR/TX-ERR); how many were dropped (RX-DRP/TX-DRP); and how many were lost because of an overrun (RX-OVR/TX-OVR). The last column shows the flags that have been set for this interface. These characters are one-character versions of the long flag names that are printed when you display the interface configuration with ifconfig: B

netstat--Show Routing Table

-sh-3.00$ netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 169.254.100.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8 169.254.200.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1 68.180.200.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0 0.0.0.0 68.180.200.1 0.0.0.0 UG 0 0 0 eth0 The –n option makes netstat print addresses as dotted quad IP numbers rather than the symbolic host and network names. This option is especially useful when you want to avoid address lookups over the network (e.g., to a DNS or NIS server). The second column of netstat 's output shows the gateway to which the routing entry points. If no gateway is used, an asterisk is printed instead. The third column shows the “generality” of the route, i.e., the network mask for this route. When given an IP address to find a suitable route for, the kernel steps thr

find command