User Tools

Site Tools


linux:network-utilities

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:network-utilities [2019/01/21 11:17] (current)
seanburns created
Line 1: Line 1:
 +<markdown>
 +# Some basic linux networking programs
  
 +## Interactive 
 +
 +```bash
 +sudo iptraf                             # Interactive colorful IP Lan Monitor
 +sudo iotop                              # simple top-like I/O monitor
 +sudo iotop --only                       # only show processes or threads doing I/O
 +sudo iftop -i eth0                      # display bandwidth usage on an interface by host
 +sudo tcpick -C                          # tcp stream sniffer and connection tracker
 +sudo tcpick -i eth0 -C -h -a            # header and names resoution
 +nmon                                    # systems administrator, tuner, and benchmark tool
 +nmon -f -s 30 -c 120                    # save output to file, every 30 seconds, 120 times (1 hour)
 +tail -f file                            # watch file
 +```
 +
 +## nmap
 +
 +```bash
 +sudo nmap 10.163.36.13                  # List open ports
 +sudo nmap -O 10.163.36.13               # List open ports, enable OS detection
 +sudo nmap -sV 10.163.36.13              # List services
 +ifconfig                                # identify network ID and Mask
 +sudo nmap -sP 10.163.36.0/24            # map network or subnet
 +```
 +
 +## tcpdump
 +
 +```bash
 +sudo tcpdump host 10.163.36.13          # see all packets leaving and coming
 +                                          to my machine machine
 +sudo tcpdump src 10.163.36.13           # see packets leaving my machine
 +sudo tcpdump dst 10.163.36.13           # see packets coming to my machine
 +sudo tcpdump port 6667                  # capture packets on port 6667
 +sudo tcpdump port 6667 -w irc.pcap      # save all IRC traffic to irc.pcap file
 +sudo tcpdump port 80 -w http.pcap       # save all http traffic to http.pcap file
 +sudo tcpdump -i eth0 -X -vvv            # -X print data of each packet in hex and ASCII
 +                                        # -vvv be very verbose
 +```
 +
 +## nmcli
 +
 +```bash
 +ifconfig -a                             # display all network interfaces on system
 +sudo nmcli device status                # display current status
 +sudo nmcli -f ip4.address device show eno1  # display ip address and /cidr for
 +                                            # device
 +```
 +
 +Bring connection down and up, where ``en01`` is the name of the device.
 +
 +```bash
 +sudo ifdown eno1
 +sudo ifup eno1
 +```
 +
 +Alternatively:
 +
 +```bash
 +sudo nmcli device disconnect eno1
 +sudo nmcli device connect eno1
 +```
 +</markdown>
linux/network-utilities.txt ยท Last modified: 2019/01/21 11:17 by seanburns