Linux Network Operations Related command Rollup _unix Linux

Source: Internet
Author: User
Tags curl
Linux operations-related command rollup GitHub address: Https://github.com/zhwj184/shell-work
Copy Code code as follows:

#/bin/sh
#查看http请求的header
Tcpdump-s 1024-l-a-n Host 192.168.9.56
Tcpdump-s 1024-l-A src 192.168.9.56 or DST 192.168.9.56
sudo tcpdump-a-S 1492 DST Port 80
#本地网络中IP地址为192.168.0.5 host is now communicating with the outside world
sudo tcpdump-i eth0 src host 192.168.0.5
#查看网卡eth0的http请求的tcp包
Tcpdump-i eth0 Port http
Tcpdump-i eth0 Port http or port SMTP or port pop3-l-A | Egrep-i ' Pass=|pwd=|log=|login=|user=|username=|pw=|passw=|passwd=|password=|pass:|user:|userna me:|password:| Login:|pass |user '

#查看tcp, upd,icmp non-SSH packages
Tcpdump-n-v TCP or UDP or ICMP and not port 22

#查看http请求的request Bag
sudo tcpdump-i eth0 Port 80-w-

#过滤http响应的get Host Header information
sudo tcpdump-i en1-n-S 0-w-| Grep-a-o-e "Get \/.*| Host\:. * "

#DNS查询请求响应包
sudo tcpdump-i en0 ' UDP port 53 '
#nmap-sp Specifies to use ping echo for scanning/24 to see how many hosts are running in the destination network
NMAP-SP 192.168.0.1
NMAP-SP 192.168.0.0/24
Nmap-o www.baidu.com
#Netstat主要用于Linux/unix hosts look at their own network conditions, such as the ports on which they are opened, the services they serve, and the status of their services
Netstat-a
Netstat-nlp
#netcat扫描机器开放的端口
Nc-z-v-n 172.31.100.7 21-25
The #netcat command connects open port 21 and prints the banner information that is running on the service on this port.
Nc-v 172.31.100.7 21
#输出网络的路由表
Route
#显示结果包括服务器已经运行了多长时间, how many landing users and the overall assessment of server performance (load average).
Uptime
#监控 the traffic of the ETH1 network card
Iftop-i eth1
The #以位元组 (bytes bytes) shows the traffic (preset is bit bits):
Iftop-b
#直接显示 IP, do not perform DNS anti-solution:
Iftop-n
#直接显示连接埠编号, do not display service name:
Iftop-n
#显示某个网段进出封包流量
Iftop-f 192.168.1.0/24 or 192.168.1.0/255.255.255.0

#网络流量实时监控工具之nload, view the traffic of the NIC Eth0
Nload-n eth0
#查看各个网卡的流量
Nload-h
#IPTraf是一个网络监控工具, the function is more powerful than nload, can monitor all traffic, IP traffic, according to the Protocol of traffic, can also set the filter
Iptraf

#查看网络接口当前配置与接口命名:
Ifconfig
#打开 (UP) or off (down) adapters
Ifconfig < Network name > <up|down>
#为适配器分配IP地址:
Ifconfig < Network name > &LT;IP address >
#为适配器分配第二个IP地址:
Ifconfig < Network Name: Number of instances > &LT;IP address >
#显示某个网络适配器的驱动信息, suitable for querying software compatibility:
Ethtool-i eth0
#显示网络数据:
Ethtool-s
#设置适配器连接速度 (Mbps)
Ethtool Speed <10|100|1000>

#iwconfig Check basic Wi-Fi network settings, such as SSID, channel, and encryption details. You can also modify some of the advanced settings, including receiving sensitivity, rts/cts, fragmentation, and retries
#显示当前无线设置, including the interface name:
Iwconfig
#设置ESSID (extended service settings recognizer) or network name:
Iwconfig < Interface name > Essid < Network name >

#wget
Wget-s--spider http://osswin.sourceforge.net/2>&1 | grep Mod
#查看mac地址
Cat/sys/class/net/*/address
#查看eth0的ip
Ifconfig eth0 | awk '/inet addr/{split ($2,a, ":"); Print a[2]} '
#curl View the Domail name of the page
Curl-s Http://en.m.wikipedia.org/wiki/List_of_Internet_top-level_domains | Sed-n '/<tr valign= ' top ' >/{s/<[^>]*>//g;p} '
#talnet
telnet localhost 6666
#查看所有的网络接口
awk ' {print $} '/proc/net/dev|grep: |sed ' s/:.*//g '

#查看DNS Server version is good
Nslookup-q=txt-class=chaos Version.bind NS. PHX5. Nearlyfreespeech.net

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.