Dear Viewers - Now you can share your technical posts through this channel. Kindly write me for more details !!

How to Install VNC Server in CentOS

Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another. VNC is a open source software, compatible with Windows and Unix/Linux.
The server transmits a duplicate display of a remote computer to the viewer.

Step 1: Installing GNOME Desktop

yum groupinstall "X Window System" "Desktop"
or
yum groupinstall "GNOME Desktop"

Step 2: Installing TightVNC Server

yum install -y tigervnc-server

Step 3: Create User

useradd vncuser
passwd vncuser

Step 4: Set VNC password for User

su - vncuser
vncpasswd

Note : This password is for accessing VNC remote desktop, and the password we created in step 3 is for accessing SSH.

Step 5: Create VNC Xstartup Script

/etc/init.d/vncserver start

## output is like - Starting VNC server: 1:vncuser
New 'vncuser.com:1 (vncuser)' desktop is vncuser.com:1
Starting applications specified in /home/vncuser/.vnc/xstartup
Log file is /home/vncuser/.vnc/vncuser.com:1.log
[  OK  ] ##

Note : check whether xstartup script is created under (vncuser) user’s home directory

ls- l/home/vncuser/.vnc
## Output is like - -rw-------. 1 vncuser vncuser    8 Jul 15 12:27 passwd
-rwxr-xr-x. 1 vncuser vncuser 654 Oct 11  2012 xstartup ##

Step 6: Set Xstarup Resolution (edit the file like below)

vi /etc/sysconfig/vncservers

VNCSERVERS="1:vncuser"
VNCSERVERARGS[1]="-geometry 800x600"

To restart, status, stop the services
/etc/init.d/vncserver restart
/etc/init.d/vncserver status
/etc/init.d/vncserver stop

To check the status of running services
chkconfig
chkconfig vncserver on

NoteChkconfig command is used to setup, view, or change services that are configured to start automatically during the system startup.

Path MTU Discovery

This technique tests path with large packet and once it is found, the network MTU’s size is dependent on in each packet transmission. 

Let's take an example to understand - 
Image result for path mtu discovery
PC 1 sends the first packet to test  path in order to see what size is the largest for MTU. Once the packet crosses Network 2, the router immediately sends its feedback telling the host that 1500 KB is the MTU, then the packet proceeds with transmission to reach Network 3 in which the router provides feedback informing the host (PC1) that MTU is 1200 KB, after that the packet will continue its way to Network 4 wherein the router will let the host (PC1) know that the largest size is 800 KB. Finally, the host ( PC1) will set its MTU to 800, and all transmitting packets will be 800 KB until the last packet sent.

The default MTU is 1500 bytes in size, not including the Ethernet header or trailer. This means a host needing to send a TCP data stream would typically use the first 20 of these 1500 bytes for the IP header, the next 20 for the TCP header, and as much of the remaining 1460 bytes as necessary for the data payload. Encapsulating data in maximum-size packets like this allows for the least possible consumption of bandwidth by protocol overhead.

To find the proper MTU size, you'll have to do a special ping. This could be a local machine (a router, gateway) or a distant server on the internet (eg. google.com)

In case of a Windows machine the ping command should be formatted like:
ping [-f] [-l <packet size>] [host]
An example test-run would be:
ping -f -l 1472 google.com
(result = "Packet needs to be fragmented but DF set.")
ping -f -l 1462 google.com
(result = "Request timed out.")
ping -f -l 1452 google.com
(result = reply)
The options used are:

-f: set "Don't Fragment" flag in packet
-l size: send buffer size
In case of Linux, the command line should be:

ping [-M do] [-s <packet size>] [host]

An example test-run would be:

ping -M do -s 1472 google.com
(result = "Frag needed and DF set")
ping -M do -s 1462 google.com
(result = "Frag needed and DF set")
ping -M do -s 1452 google.com
(result = reply)

The options used are:

-M <hint>: Select Path MTU Discovery strategy. <hint> may be either "do" (prohibit fragmentation, even local one), "want" (do PMTU discovery, fragment locally when packet size is large), or "dont" (do not set DF flag).

-s packetsize: Specifies the number of data bytes to be sent. The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data.


PathPing

The PathPing tool is a route tracing tool (inbuilt in MS Windows), that combines features of Ping and Tracert with additional information that neither of those tools provides. PathPing sends packets to each router on the way to a final destination over a period of time, and then computes results based on the packets returned from each hop. Since PathPing shows the degree of packet loss at any given router or link, you can pinpoint which routers or links might be causing network problems. Can also be download from here PathPing 4Windows .

FTP Server configuration in Linux

How to install FTP server -
(using yum server)
#Yum install vsftpd*
or (using rpm)
#rpm -ivh vsftpd*

How to allow FTP services to users -
#cd /etc/vsftpd
#vi ftpusers
(Remove # sign from users that we want to allow in this file)
 #vi userlist

Also make changes same as above (ftpusers) file

How to change home directory of FTP?
(#/var/ftp/pub - by default FTP directory)
#setsebool ftp_home_dir on
#vi /etc/passwd (make changes in this file)

How to start FTP services
#service vsftpd start/restart
#chkconfig vsftpd --list
#chkconfig vsftpd on

How to uninstall FTP package
 #Yum erase vsftpd*
or
#rpm -e vsftpd*

 ***Note: vsftpd is server and ftp is client

Most favorite commands of every System Admin

Every system/ network administrator must know about these commands -->

firewall.cpl
mstsc
compmgmt.msc
inetcpl.cpl
ipconfig
netstat
ncpa.cpl
nslookup
pathping
ping
arp -a
route
sysdm.cpl
telnet
tracert
tasklist
sfc
shutdown

What is wireshark and how to use it

Wireshark

Wireshark is a free and open source packet analyzer. Originally named Ethereal, the project was renamed Wireshark. It lets you capture and interactively browse the traffic running on a computer network.
You can download Wireshark for Windows or Mac OS X from it's official website. If you’re using Linux or another UNIX-like system, you’ll probably find Wireshark in its package repositories. For example, if you’re using Ubuntu, you’ll find Wireshark in the Ubuntu Software Center.
Just a quick warning: Many organizations don’t allow Wireshark and similar tools on their networks. Don’t use this tool at work unless you have permission.

Capturing Packets

After downloading and installing Wireshark, you can launch it and click the name of an interface under Interface List to start capturing packets on that interface. For example, if you want to capture traffic on the wireless network, click your wireless interface. You can configure advanced features by clicking Capture Options, but this isn’t necessary for now.
As soon as you click the interface’s name, you’ll see the packets start to appear in real time. Wireshark captures each packet sent to or from your system. If you’re capturing on a wireless interface and have promiscuous mode enabled in your capture options, you’ll also see other the other packets on the network.
Click the stop capture button near the top left corner of the window when you want to stop capturing traffic.

Our facebook email address "username@facebook.com"

Your email address on Facebook is the same as your username or your public user ID.
Do you know any user of gmail, yahoo mail or other mailbox service user can send u emails at this address and u can find that mail in your Facebook inbox.
Like u can send me emails at - deeepanshu@facebook.com as well as deepanshusharma276@gmail.com

How to Make Personal Diary Using Notepad

Here we will learn to use notepad as Digital diary to keep record of your daily work instead of using pen and paper.

1. Open Notepad and Type .LOG (in capital Letters and press enter)
2. Save the program with any name and close it.
3. Open the file again. Now you can see current date and time, This will happen every time you reopen notepad

Automatically Delete Files Sent to Recycle Bin

To automatically delete files sent to the recycle bin, do the following:

1. Right click on the recycle bin icon
2. Choose Properties
3. Check the Remove files immediately upon delete an then OK

How to remove the Microsoft Copyright from DOS Prompt

Follow these steps :
1. Make a shortcut on desktop(command prompt)
2. Go to properties
3. Choose Details tab


4. Select REMOVE PROPERTIES AND PERSONAL INFORMATION
5. Select remove the following properties from this file
6. Choose copyright and click OK

Keylogger

Keylogger is very famous and favorite hacking tool of hackers. If you visit a cyber cafe and find any black/white ps2 or USB pin attached to the CPU as shown in the picture, do not use that system. This pin is actually a connection which saves all your data you enter in the system. It is a hardware keylogger, very powerful, it records each and every action on your system. It is a risk to your privacy over the net, at risk are passwords, banking, or any other data you enter.
Whenever a person logs on to the computer (irrespective of user name)The program will be active in the memory and records whatever button you press means it records your key-strokes of the keyboard.

What is Wipe Partition


Do you know after format a hard disk, the data never delete permanently. Your sensitive data is too easily recovered if you rely on the standard delete function, formatting or even re - partitioning your hard disk. Unidentified copies of those files could exist in "unused" parts of your hard drive, or in your Swap file, among other possible locations. Your discarded hard disk contains your personal information. Thieves know that most people don't know how to correctly erase hard drive data before giving their hard disks away. So the thieves can target personal information on discarded hard disks and use it to steal your identity. 
Thats why we make wipe partition. 
Wipe partition can erase the data on the partition completely and ensure that the data cannot be recovered by any data recovery solution. This function can prevent undesired recovery of your deleted data.
Many third party softwares are available in the market they can cover the data with zeroes patterns, making it unreadable by data recovery software.

How To fix corrupted XP files

Requirement:
1. Windows XP CD
Now, follow this steps:
Step 1. Place the xp cd in your cd/dvd drive
Step 2. Go to start
Step 3. Run
Step 4. Type sfc /scannow
Now sit back and relax, it should all load and fix all your corrupted file on win XP.

What is a VHD file


VHD is an acronym for Virtual Hard Disk. Files that have the .vhd file extension contain disk images that are used by the Microsoft Virtual Server. The VHD file stores data within an individual file and acts in the same was as a physical hard disk. 

VHD files are commonly used to install multiple operating systems on a single hard drive and to test various software applications. 

Click Start, type diskmgmt.msc and press Enter, then Click Action > Create VHD and you can now create a new virtual drive of your own (right-click it, select Initialise Disk, and after it's set up right-click the unallocated space and select New Simple Volume to set this up). Again, you'll be left with a virtual drive that behaves just like any other, where you can drag and drop files, install programs, test partitioning software or do whatever you like. But it's actually just this VHD file on your real hard drive which you can easily back up or share with others. Right-click the disk (that's the left-hand label that says "Disk 2" or whatever) and select Detach VHD to remove it.

What happens when we ping

Take a scenario, where a user pings the website www.facebook.com from a PC. On the PC screen from where the ping is issued, the reply is from an IP address and not from the website name www.facebook.com. Network communications are based on IP addresses and not domain names. When the command ping www.facebook.com is typed, a DNS query is send by the PC to the DNS server IP address which is configured on the TCP/IP adapter settings of the PC, to retrieve the IP address of www.facebook.com. After the IP address is received, the ICMP request (Ping request) is sent to the IP address of the website to which the server sends a reply.

What is Disk quota

Its very Important topic in OS
.
Disk quota management are permissions given by administrators that set limits on the user, workgroups, or other groups of storage space.
In other word we can say that a disk quota is a limit set by a system administrator that restricts certain aspects of file system usage on operating systems. The function of using disk quotas is to allocate limited disk space in a reasonable way.
How to enable Quota ?
First Go to my computer > Choose any drive > Open properties of that drive > Click Quota (tab) > Show Quota Settings and then after manage it as u want

What is ntvdm.exe

Ntvdm.exe is the Windows NT Virtual DOS Machine. Virtual DOS machine (VDM) is a technology that allows running legacy DOS and 16-bit Windows programs on Intel 80386 or higher computers when there is already another operating system running and controlling the hardware. This is used by Windows to allow DOS applications to run under Windows NT-based operating systems (2000, XP, Vista, 7).

This process will be located at c:\windows\system32\ntvdm

What is Content Advisor

Content Advisor is a tool for controlling the types of content that your computer can access on the Internet. After you turn on Content Advisor, only rated content that meets or exceeds your criteria can be viewed. You can adjust the settings to suit your preferences.
Using this tool you can create a list of websites that should always be blocked, regardless of how their content is rated.

How to enable this tool . . .
Click on Start button and then clicking Internet Explorer.

Click the Tools button, and then click Internet Options.

Click the Content tab, and then under Content Advisor tab, click Enable. and type the supervisor password.

To allow others to view restricted content, click the General tab, and then select the Supervisor can type a password to allow users to view restricted content check box.

To allow others to view unrated content, select the Users can see sites that have no rating check box.

Click OK.

How to use USB pen drive as RAM in Windows (Virtual Ram)

This is based on virtual memory.

1. First connect your pen drive to computer. 
2. Now right click on the my computer and then click properties. 
3. Click on Advanced Tab and then Performance. 
4. Now click on Advanced and then click on Virtual Memory.
5. Select your pen drive icon and click Custom size.
6. Now view the memory available in your pen drive and note it down then click on OK.
7. Restart your computer and enjoy your fast system.

************************************************

How to use USB pen drive as RAM in Windows Vista and Windows 7 -:
1. Insert your pen drive and format it.
2. Right click on your pen drive and click on properties.
3. Now click on Ready boost tab and then Use this device.
4. Choose maximum space to reserve system speed then click on OK and Apply. You've done! use your pen drive as RAM.

How TO AVOID FRIEND REQUEST BLOCK On FACEBOOK

We usually send friend requests and if it's not accepted it is kept in pending. 
If there are lots of pending requests it may lead to block.
So this is a simple way to get those requests cancelled and protect your account from being blocked.

Follow below steps :-
1. Go to account settings.
2. Select `download a copy` option.
3. Choose `expanded archive` from the next page opened and enter your password and click continue.
4. Select `start my archive`.
5. After a few hours you'll get the download link in your email.
5. Download the file `facebook` and unzip it.
6. Open the folder html and then `friend_requests.htm­l`.
7. You can see the list of your friend requests and pending lists.
Now goto their accounts and click`cancel request.

That's all You are done now. Your account is safe.

 
HackersGear © 2010| Designed by Patch