Saturday, December 21, 2013

NMAP

NMAP is an awesome tool for network mapping.

To know more:
1) install nmap
:~$ sudo apt-get install nmap

2) Commands:
for commands type
:~$nmap

The above will list commands available.

3) Great article about nmap commands:
http://www.cyberciti.biz/networking/nmap-command-examples-tutorials/

Network Mapping in Linux

1) How to get Default Gateway in linux:

:~$ route -n

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.3.1   0.0.0.0         UG    0      0        0 wlan0
192.168.3.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0

Then 192.168.3.1 is the default gateway (which resides in the router)

2) traceroute:

Gives echo response from every networking device that we go through.

e.g.:
~$ traceroute linkedin.com
traceroute to linkedin.com (216.52.242.86), 30 hops max, 60 byte packets
 1  * * *
 2  24.4.96.1 (24.4.96.1)  12.809 ms  18.279 ms  18.287 ms
 3  te-0-2-0-0-ur05.santaclara.ca.sfba.comcast.net (68.85.191.161)  18.279 ms  18.277 ms  18.271 ms
 4  te-1-1-0-10-ar01.sfsutro.ca.sfba.comcast.net (68.87.226.118)  25.134 ms te-1-1-0-1-ar01.sfsutro.ca.sfba.comcast.net (69.139.198.90)  25.115 ms te-1-1-0-0-ar01.sfsutro.ca.sfba.comcast.net (69.139.198.82)  25.056 ms
 5  he-3-8-0-0-cr01.sanjose.ca.ibone.comcast.net (68.86.94.85)  28.455 ms  28.475 ms  28.472 ms
 6  50-242-148-34-static.hfc.comcastbusiness.net (50.242.148.34)  45.187 ms  38.972 ms  37.976 ms
 7  vlan70.csw2.SanJose1.Level3.net (4.69.152.126)  47.620 ms  47.597 ms  47.543 ms
 8  ae-71-71.ebr1.SanJose1.Level3.net (4.69.153.5)  47.486 ms  44.121 ms ae-91-91.ebr1.SanJose1.Level3.net (4.69.153.13)  47.694 ms
 9  ae-2-2.ebr3.LosAngeles1.Level3.net (4.69.132.10)  44.047 ms  44.664 ms  44.634 ms
10  ae-73-73.csw2.LosAngeles1.Level3.net (4.69.137.38)  47.430 ms ae-93-93.csw4.LosAngeles1.Level3.net (4.69.137.46)  45.049 ms ae-63-63.csw1.LosAngeles1.Level3.net (4.69.137.34)  46.555 ms


The above command shows all the routers this command goes through to reach the server for linkedin.com. Above shows that linkedin have their main router in Los Angeles.

3) How to get address resolution protocol address:
~$ arp -n

4)How much time does it take to get response from a server/website:

dig archlinux.org | grep "Query time"

5)Who is on my network??

:~$ whowatch

The above is a utility which tells you people connected to the network.

6) Excellent article on loopback:
http://askubuntu.com/questions/247625/what-is-the-loopback-device-and-how-do-i-use-it

7) how to check devices (hosts) in your network:
nmap -w -sP 192.168.3.100/24
 


Monday, December 16, 2013

Great article about node.js

http://stackoverflow.com/questions/1884724/what-is-node-js

Developing client applications if you detest JavaScript: http://www.gwtproject.org/overview.html

Framework for node.js: http://nodeframework.com/

Communities for node.js:
1) http://gruntjs.com/
2) http://momentjs.com/
3) http://mean.io/


Great web developer:

https://medium.com/what-i-learned-building/905b0d7d15c3
(http://sagiisha.com/)
 

Monday, December 9, 2013

General Ubuntu Commands

1) How to check the type of RAM you have.

$ sudo dmidecode --type 17

Result should be like:

SMBIOS 2.7 present.

Handle 0x0008, DMI type 17, 21 bytes
Memory Device
    Array Handle: 0x0007
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 2048 MB
    Form Factor: SODIMM
    Set: None
    Locator: SODIMM1
    Bank Locator: Bank 0
    Type: DDR3
    Type Detail: Unknown

Handle 0x000A, DMI type 17, 21 bytes
Memory Device
    Array Handle: 0x0007
    Error Information Handle: Not Provided
    Total Width: Unknown
    Data Width: Unknown
    Size: No Module Installed
    Form Factor: SODIMM
    Set: None
    Locator: SODIMM2
    Bank Locator: Bank 1
    Type: Unknown
    Type Detail: Unknown

2. Interesting website which tells you about your memory and other things.
crucial.com