KEMBAR78
Linux Network commands | PDF
My Connection
Network Configuration..
$ smbtree
Think about it for a second !!!!



       Why single physical interface
       should be limited to single IP
                address??
ifconfig eth0 <ip> netmask 10.248.255.0 up
 sudo route add default gw 10.1.1.2
Test Connection..




user@computer-name:~$ ping www.google.com
PING www.l.google.com (66.102.13.106) 56(84) bytes of data.
DNS Tools..
host:used to map names to IP add.




$ host www.google.com
 www.google.com is an alias for www.l.google.com.
 www.l.google.com has address 66.102.13.104
nslookup




nslookup 66.102.13.103
$ whois   66.102.13.103
How many hops until some destination?




   $ traceroute www.amazoon.com
Netstat :
List listening sockets ,
   associated port#
      and process.

      netstat -l -p -n
      netstat --tcp
      netstat --udp
      netstat -i
      netstat -s
ethtool:
What driver is responsible for
 certain network interface




    $ ethtool -i <interface>


   $ ethtool <interface>
finger: to contact the necessary
server and retrieve info. about user.




      finger Email || username
Arp - Route

List ARP table (MAC-IP)


       $ arp


Show routing information

    $ route -v
Security Tools
FireWall..




sudo ufw enable
         disable
Nmap:




sudo nmap 192.168.1.1-255
     nmap localhost
Netcat : The network Swiss
        army knife




 $ nc -v -w1 localhost -z From-ToPort
tcpdump : a packet sniffer




                  $ tcpdump -i eth0
$ tcpdump -w file -i eth0   Capture packets > file


 $ tcpdump -tttt -r file    Read sniffing data



  $ tcpdump -n -i eth0      Capture packets with IPs



 $ tcpdump -i eth0 arp      packets of protocol type


$ tcpdump -i eth0 port 22
                            from particular port
Browsers from Terminal!!



  lynx www.google.com




 lynx www.facebook.com
wget www.google.com
Talk (MultiUser)



     talk

      wall

     write
Telnet vs SSH
Telnet
 sudo apt-get install telnetd

 $ ufw allow 23

 $ telnet localhost




Just try to ping it.. then telnet it
SSH
  Secure Shell, a network protocol for remote
      administration of Unix computers


$ sudo apt-get install openssh-server

$ ufw allow 22
$ nmap localhost

$ ssh user@pc-name
PuTTY

An open source telnet and SSH Client
for Windows ..
Send messages between 2
      Ubuntu PCs

ssh <user name>@<ip address>

export DISPLAY=:0.0
notify-send "Title” "message text"
References:
1.http://www.alexonlinux.com/useful-linux-networking-commands
        2.http://www.alexonlinux.com/tcpdump-for-dummies
3.http://www.karakas-online.de/gnu-linux-tools-summary/network
                           -commands.html
     4.http://www.linuxplanet.com/linuxplanet/tutorials/7044/1/
  5.http://aalagha.com/blog/2008/01/22/netcat-swiss-army-knife
            6.http://www.dd-wrt.com/wiki/index.php/SSH
7.http://www.slideshare.net/tmavroidis/linuxnetworkingcommands
                         8. http://sectools.org/
9.http://askubuntu.com/questions/31582/send-messages-between
                     -2-ubuntu-pcs-net-send-style
       10.http://ubuntuforums.org/showthread.php?t=100198
    11.http://linux.about.com/od/commands/l/blcmdl1_talk.htm
     12.http://forum.codecall.net/linux-networking/index3.html

Linux Network commands