Thursday 12 September 2013

Command: ps


  1) What is difference between ps -ef and ps -auxwww?

ps -ef will omit process with very long command line while ps -auxwww will list those process as well.
I have faced this issue while ago where one culprit process was not visible by execute ps –ef command and we are wondering which process is holding the file.

What is the difference between Swapping and Paging? (Unix)


Swapping:
Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory. It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems.
Paging:
Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Gives the concept of the virtual memory. It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the greater process size than the available physical memory. Demand paging systems handle the memory more flexibly.

Friday 6 September 2013

How to chek whether your VPN server support PPTP or L2TP

PPTP,L2TP and OpenVPN are some of the protocols which are used commonly for VPN connections.

====
PPTP
====

PPTP (Point to Point tunneling Protocol) is basic form of VPS connection  witn 128 bit encryption.
PPTP uses the types of authentication as PPP (PAP, SPAP, CHAP, MS-CHAP v.1/v.2 and EAP).
How works: A PPTP tunnel is instantiated by communication to the peer on TCP port 1723.
This TCP connection is then used to initiate and manage as second GRE(generic routing encapsulation) tunnel to the same peer.

Port/Protocol: 1723 TCP and protocol GRE

User Authentication Protocol: EAP-TLS or MS-CHAP v2

Encryption method: MPPE (Microsoft Point-to-Point Encryption)

Encryption Strength: MPPE 40-128 bit

=====
L2TP
=====

L2TP/IPsec (Layer 2 tunneling Protol with IPsecurity) is a very secure protocol build-into a wide array of desktop and mobile devices with 256-bit encryption.
L2TP is not a stand alone protocol as it reqiures other other protocols for encryption support like IPsec.

Port: 1701 UDP

Both PPTP and L2TP are available for a wide range of products like Mobile, Desktop etc.
Open VPN protocol is used basically for Desktops


We can just know whether the server is configured for PPTP or L2TP just by using telnet command to the destination server

1) If the connection it using PPTP. Telnet to port 1723 will be successful

---------------------------------
   #telnet vpnhost.com 1723
---------------------------------

Use the following settings shown in screen shot under your VPN connection .


2) If the connection is using L2TP. Telnet to por 1701 will be successful.

---------------------------------
    #telnet vpnhost.com 1701   
---------------------------------

Use the following settings shown in screen shot under your VPN connection .


Reference:
(*) http://technet.microsoft.com/en-us/library/cc771298%28v=ws.10%29.aspx
(*) http://technet.microsoft.com/en-us/library/dd458955%28v=ws.10%29.aspx