January 25, 2014

Enable IP Forwarding

IP Forwarding or IP Packet Forwarding  are also know as Internet Routing. It is a process used to determine in which path a packet has to be sent.

By default, IP Packet Forwarding is disabled in Windows and Linux OS. Lets see how to Enable IP Packet forwarding in windows and linux OS.

To enable IP Forwarding in Linux OS
IP Forwarding information in Linux OS is maintained in ip_forwarding file which is located at /proc/sys/net/ipv4/
Use  following command to enable ip forwarding
#echo 1 > /proc/sys/net/ipv4/ip_forwarding

By default value in this file is "0" .  We need to change this value to "1" to enable ip forwarding.

To enable IP Forwarding in Window OS


Start Registry Editor by typing regedit in command prompt.
In Registry Editor, locate HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters









Set the following registry value:
Value Name: IPEnableRouter
Value Type: REG_DWORD
Value Data: 1






 















A value of “1” is to enable TCP/IP forwarding for all network connections that are installed whereas value of “0” is to disable TCP/IP forwarding.

Quit Registry Editor


Press  Win+R and type "services.msc" and then press enter to open Windows Service. In services select service "Routing and Remote Connection". Open its properties by double clicking and change the Startup type from "disable" to "Automatic".


October 13, 2013

IP and DNS Configuration in Backtrack using Command Prompt

BackTrack is a Linux-based penetration testing arsenal that aids security professionals in the ability to perform assessments in a purely native environment dedicated to hacking. To connect BackTrack Machine with network you have configure IP Address and DNS entries.


View IP Address Configuration in BackTrack
#ifconfig

Configure IP Address
ifconfig interface_name ip_address
Ex:
#ifconfig eth0 172.31.1.10  ( with Default Subnet Mark)
#ifconfig eth0 172.31.1.10 255.255.192.0  (with subnet mask)
#ifconfig eth0 172.31.1.10/26   (with CIDR notation)

View Route Information
#route

Manually Configure Default Gateway:
route add default gw ip_address interface
Ex:
#route add default gw 172.31.1.1 eth0

Configure DNS Server's IP Address:
echo nameserver ip_address > /etc/resolv.conf
Ex:
#echo nameserver 8.8.4.4 > /etc/resolv.conf

Note: In Backtrack DNS Servers configuration is saved in resolv.conf file which is located in /etc directory

Turn On  Network Interface Card (NIC)
ifconfig interface up
Ex:
#ifconfig eth0 up
#ifconfig wlan0 up

Configure BackTrack Network Service
/etc/init.d/networking restart   -  To restart network service
/etc/init.d/networking start      - To start network service
/etc/init.d/networking stop       - To stop network service

July 26, 2013

Cisco Packet Tracer

Cisco Packet Tracer is a powerful network simulation program that allows students to experiment with network behavior and ask “what if” questions. As an integral part of the Networking Academy comprehensive learning experience, Packet Tracer provides simulation, visualization, authoring, assessment, and collaboration capabilities and facilitates the teaching and learning of complex technology concepts.

Packet Tracer supplements physical equipment in the classroom by allowing students to create a network with an almost unlimited number of devices, encouraging practice, discovery, and troubleshooting. The simulation-based learning environment helps students develop 21st century skills such as decision making, creative and critical thinking, and problem solving. Packet Tracer complements the Networking Academy curricula, allowing instructors to easily teach and demonstrate complex technical concepts and networking systems design.


Features
Cisco Packet Tracer includes the following features:
  • Makes teaching easier by providinga free, multiuser environment for instructors to easily teach complex technical concepts
  • Makes learning easier by providing a realistic network simulation and visualization environment
  • Provides authoring of learning activities,tasks, labs, and complex assessments 
  • Supports lectures, group and individual labs, homework,assessments, case studies, games, and competitions
  • Supplements real equipment and enables extended learning opportunities beyond physical classroom limitations
  • Simulates continuous real-time updates of underlying network logic and activities
  • Empowers students to explore concepts, conduct experiments, and test their understanding
  • Promotes social learning through a network-capable (peer-to-peer) application with opportunities for multiuser competition, remote instructor-student interactions, social networking, and gaming
  • Supports the majority of protocols and technologies taught in the following Networking Academy curricula: 
    • Cisco CCNA® Discovery,CCNA Exploration, and CCNA
    • Security, and can also be used to teach concepts from 
    • IT Essentials and Cisco CCNP® courses



Layer Cisco Packet Tracer Supported Protocols

Application: FTP , SMTP, POP3, HTTP, TFTP, Telnet, SSH, DNS, DHCP, NTP, SNMP, AAA, ISR VOIP, SCCP config and calls ISR command support, CallManager Express

Transport: TCP and UDP, TCP Nagle Algorithm & IP Fragmentation, RTP

Network: BGP, IPv4, ICMP, ARP, IPv6, ICMPv6, IPSec, RIPv1/v2/ng, Multi-AreaOSPF, EIGRP,StaticRouting,Route Redistribution, Multilayer Switching, L3 QoS, NAT, CBAL , Zone-based policy firewall and Intrusion ProtectionSystem on the ISR,GREVPN, IPSecVPN

Network Access/Interface: Ethernet(802.3), 802.11, HDLC, FrameRelay, PPP, PPPoE, STP, RSTP, VTP, DTP, CDP, 802.1q, PAgP, L2QoS, SLARP, SimpleWEP, WPA, EAP


Download Cisco Packet Tracer 6.0.1 for Windows (no tutorials)


Download Cisco Packet Tracer 6.0.1 for Windows (with tutorials)

June 30, 2013

Check CPU and PC Infomation in Ubuntu


There are various ways to find put the system hardware information. I have list below few of them.

1. cat

Another way to get such details is use following command:
$ cat  /proc/cpuinfo


In Ubuntu system information are stored in some system files. To know all this information first you need to know at what file which information is stored. Once you came to know about that then you can get all information using just basic commands.


Cat is such basic command to show the content within file.

Sample Output:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
stepping : 7
microcode : 0x1b
cpu MHz : 2501.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 4988.78
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:



As i have Intel i5 processor, its showing repeated same info for all other 3 core. To make this post short I had eliminated that. When you try on your system you will find whole output.



2. Dmidecode


dmidecode  is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description  of  the  system's  hardware  components,  as well as other useful pieces of information such as serial numbers and BIOS revision.  Thanks to  this  table,  you  can  retrieve this information without having to probe for the actual hardware.  While this is a good point in terms  of report  speed  and  safeness, this also makes the presented information possibly unreliable.


As you run it, dmidecode will try to locate the DMI table. If  it  succeeds, it will then parse this table and display a list of records like this one:


Handle 0x0002, DMI type 2, 8 bytes.  Base Board Information
Manufacturer: Intel
Product Name: C440GX+
Version: 727281-001
Serial Number: INCY92700942

DMI TYPES
Type   Information
 ────────────────────────────────────────
          0   BIOS
          1   System
          2   Base Board
          3   Chassis
          4   Processor
          5   Memory Controller
          6   Memory Module
          7   Cache
          8   Port Connector
          9   System Slots
         10   On Board Devices
         11   OEM Strings
         12   System Configuration Options
         13   BIOS Language
         14   Group Associations
         15   System Event Log
         16   Physical Memory Array
         17   Memory Device
         18   32-bit Memory Error
         19   Memory Array Mapped Address
         20   Memory Device Mapped Address
         21   Built-in Pointing Device
         22   Portable Battery
         23   System Reset
         24   Hardware Security
         25   System Power Controls
         26   Voltage Probe
         27   Cooling Device
         28   Temperature Probe
         29   Electrical Current Probe
         30   Out-of-band Remote Access
         31   Boot Integrity Services
         32   System Boot
         33   64-bit Memory Error
         34   Management Device
         35   Management Device Component
         36   Management Device Threshold Data
         37   Memory Channel
         38   IPMI Device
         39   Power Supply
         40   Additional Information
         41   Onboard Device

You can use this type to get particular information.

Example: If I need to get information about BIOS only then I will use 
sudo dmidecode  --type 1
To get information about BIOS Language use
sudo dmidecode --type 13
To get both BIOS and BIOS Language use
sudo dmidecode -- type 1 --type 13


To have information about particular component use respective type number.


3. ls*

Simply using ls will show you list of files and directory.

lscpu
lscpu  gathers  CPU  architecture  information  like  number  of  CPUs, threads, cores, sockets, NUMA nodes, information about CPU caches,  CPU family,  model,  bogoMIPS,  byte  order  and  stepping  from  sysfs and /proc/cpuinfo, and prints it in a human-readable format.   It  supports both online and offline CPUs.

lspci
lspci  is  a  utility for displaying information about PCI buses in the system and devices connected to them.

lsmod
lsmod  is  a  trivial  program which nicely formats the contents of the /proc/modules, showing what kernel modules are currently loaded.

lsusb
lsusb  is  a  utility for displaying information about USB buses in the system and the devices connected to them.

lsof
lsof  lists on its standard output file information about files opened by processes.

lshw
lshw  is  a  small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc.

lsblk
lsblk  lists information about all or the specified block devices.  The lsblk command reads the sysfs filesystem to gather information.

April 10, 2013

Ethernet Cabling

Ethernet Cabling is as important as Ethernet Cabling Standard (IEEE 802.3 Physical Layer Specification or Standard). If you are planning to take Cisco Exam then you should be aware of  Ethernet Cabling.


Three types of Ethernet cables are available:

  • Straight-through cable
  • Crossover cable
  • Rolled cable


Straight-Through Cable

The straight-through cable is used to connect
  • Host to switch or hub
  • Router to switch or hub
It is evident from the above that Straight Through Cable is used to connect dis-similar device. Of total Eight wire(4 pair), Four wires are used in straight-through cable to connect Ethernet devices. It is relatively simple to create this type of able as both end has to follow same color pattern. This color pattern used in Straight Through cable is 568B Standard which followed on both end of this cable.

Crossover Cable

The crossover cable can be used to connect
  • Switch to switch
  • Hub to hub
  • Host to host
  • Hub to switch
  • Router direct to host
You may observe from the above that Cross Over cable are used to connect similar type of device. In Cross Over cable, the same four wires are used in this cable as in the straight-through cable; we just connect different pins together.

Rollover Cable

Rollover cables also referred to as Yost cables are most commonly used to connect to a devices console port to make programming changes to the device. It is used to connect a host to a router console serial communication (com) port. If you have a Cisco router or switch, you would use this cable to connect
your PC running HyperTerminal to the Cisco hardware so that you can configure your router and switch. Eight wires are used in this cable to connect serial 
devices, although not all eight are used to send information, just as in Ethernet networking. At one end there is RJ 232 Serial Connector to connect to PC and on other end there is RJ 45 to connect to Console Port of Router.