/////////////////////////////////////////////////////////////////////////////
                                 A few links
/////////////////////////////////////////////////////////////////////////////

The following are links to web sites that have useful information.

  YoLinux Tutorials
  YoLinux Tutorial - Linux Networking
  Network Configuration Using the Command Line
  Just Linux Help Files Library
  Help File Library: Basic Command Reference for UNIX/Linux
  Tips For Linux - Tips / Tricks / Tutorials for all Linux Users
  How to use the most popular command in Unix - Grep
  How to find files in Linux using 'find'
  The Beginners Linux Guide
  Linux Newbie Administrator Guide 
  Learn Linux: Explanations are everywhere, Learn By Doing It Here!
  Just Linux : Help File Library : Samba
  Yo Linux : Linux vi and vim editor Tutorial


/////////////////////////////////////////////////////////////////////////////
                The following are general linux/unix commands
/////////////////////////////////////////////////////////////////////////////

Quick note.  Linux/Unix is 'case sensitive'.  This means it likes for comands
and file names etc.,  to be entered with exact case.

So, 'tHe CaT' is ***_NOT_*** the same as 'the cat'.
        Steven is ***_NOT_*** the same as 'steven'.

The difference in these two examples is, the first phrase in each example, uses
both uppercase letters and lowercase letters.  But the second phrase uses all
(only) lowercase letters.

Therefore the commands I list below will not work if you use the incorrect
case.  Most Linux/Unix commands use all lowercase letters.  But you may find
some that use other variations.


 -- The Commands --

Some of the most useful tools in linux/unix are :

        - grep
        - less
        - find
        - man
        - ls
        - pwd
        - whereis
        - vim

grep ... see the link below

        How to use the most popular command in Unix - Grep


less ... is a command that allows you to view files and command output in a
         way that allows you to move up and down, as well as search for key
         words or strings of characters.

        i.e.,

        less -i file-name.txt

        or ...

        ls -l | less -i

        (the '-i' means the command should ignore the case of a string.  In
        other words, 'steven' is the same as 'Steven.)



find ... To find a command or file:

        sh-2.05b$ find . -name "*command*"
        ./lost+found/#1011841/ch02-commands.html
        ./lost+found/#1305626/plugins/toc_commands.c
        ./lost+found/#1583058/testing_and_other_basic_commands.swf
        ./lost+found/#2137940/configuring_optional_commands.swf

        ...snip...

        ./files/linux-commands.txt

        ...snip...

        (When I saw the last line above, I used
         the ctr-c command to kill the process.)


whereis ... To find a command or file:

        whereis pwd

        This will show the path (where the file is located), to the command
        and some of the related files.  
        
        i.e.,

        sh-2.05b$ whereis pwd
        pwd: /bin/pwd /usr/include/pwd.h /usr/share/man/man1/pwd.1.gz
        sh-2.05b$ 


man ... There are 'man pages' for every command.  You can learn more about a
        command, or service by typing the word 'man' and then the name of the
        command or service.   

        i.e.,      
        
        man ls

        or ...

        man ls | less -i

There is also allot of information on the Internet.  You can search google for
it.


ls ... To view the files in a directory:

        ls -l

   The view the hidden files in a directory:

        ls -a (or ls -al)


cd ... To change directories:

        cd 
        
        i.e., cd /etc/samba/


pwd ... To see what directory you are in:

        pwd


vim ... To edit a text file:
        The Vim web site
        Yo Linux : Linux vi and vim editor Tutorial

        vim 

        The vim editor takes some getting used to, but it's the most powerful
                editor there is.   You can learn to use it by running the
                editor and typing this command 

		   :help

		then searching for the word "tutor".  You search by typing a
		slash "/" and the word your searching for, then the enter key.
		
		i.e., /tutor 
		
		then press the "n" key to make the cursor go to that word (in
		the file).



/////////////////////////////////////////////////////////////////////////////
                            Sniffing the traffic
/////////////////////////////////////////////////////////////////////////////

The most common sniffer in linux is called tcpdump.

The most basic command for running the sinffer:

        /sbin/tcpdump

To sniff all traffic 'to and from' a single host:

        /sbin/tcpdump host 172.16.17.10

To sniff all traffic without resolving the IP addresses to names:

        /sbin/tcpdump -nn

To sniff traffic that is only on one interface:

        /sbin/tcpdump -i eth1

To learn more about tcpdump and how to use it, you can read the 'man page'.

        man tcpdump

        There are 'man pages' for every command.  You can learn more about a
                command, or service by typing the word 'man' and then the name
                of the command or service.   i.e.,      man ls


/////////////////////////////////////////////////////////////////////////////
       The following are commands for viewing iptables firewall rules
/////////////////////////////////////////////////////////////////////////////


To list (see) the iptables rules type the following:

        /sbin/iptables -L -nv

To view the translation table type the following:'

        cat /proc/net/ip_conntrac

To list the nat rules type the following:

        /sbin/iptables -L -t nat -n -v