Linux Network Management
Linux Network Status Tool netstat-lnp-s statics data statistics-n number in the form of-L Listening Listening-u udp-t TCP SS Command use detailed
http://www.ttlsa.com/linux-command/ss-replace-netstat/
View network card trafficSar-n DEV Mii-tool eth1
Network ConfigurationIfconfig eth0 192.168.0.31 netmask 255.255.255.0ifconfig eth0 ifconfig eth0 upifconfig eth0 down
/etc/sysconfig/network-scripts/ifcfg-eth0
Routing ConfigurationRoute or Route-n to view routes add and remove Routes route add default GW 192.168.0.254 Add defaults route route add-net 172.16.0.0/16 GW 192.168.0.254 Add Network segment to specified gateway route add-net 172.16.0.0 netmask 255.255.0.0 dev eth0 add segment to specified network card route del default GW 192.168.0.254 Delete default route route D El-net 172.16.0.0/16 Delete a specified segment route
/etc/sysconfig/network-scripts/route-eth0
Routing Test tracerouteTraceroute under Linux uses the UDP encapsulation tracking package by default. If you are using ICMP encapsulation, you can use the-i option
Domain Name Resolution/etc/resolve.conf
nslookupnslookup non-interactive query (ns SOA mx any) nslookup-type=?nslookup-q=? Nslookup interactive query requires Setnslookupset type=?set q=?baidu.com nslookup-type=ptr 8.8.8.8nslookup www.qq.com 8.8.8.8nslookup-de Bug www.qq.com
DigDig baidu.com nsdig baidu.com soadig baidu.com mxdig-x 8.8.8.8-x find PTR records dig @8.8.8.8 www.qq.com @IP Specify DNS query dig www . qq.com a +trace DNS query tracking dig @ns1. youku.com youku.com AXFR get all records for the entire name server +short thin output +nocmd does not display dig version and comment information +noall output does not Flag information +answer Output shows only the answer section host
Linux Security Management--------------------------------------------------------------------------------------------------------------- ------------
iptables FirewallIptables-nvliptables-f All rules Delete iptables-z traffic counter clear 3 table 1.filter table 2.nat table 3.mangle
Linux Grab BagTcpdumpwireshark
SELinuxView SELinux Status: 1,/usr/sbin/sestatus-v # #如果SELinux The status parameter is enabled is on, SELinux Status:enabled2, Getenf Orce # #也可以用这个命令检查 off Selinux:1, temporarily off (without restarting the machine): Setenforce 0 Set SELinux to be permissive mode Setenforce 1 settings Selinu X becomes enforcing mode 2, permanently closes the Modify profile requires a reboot of the machine: Modify the/etc/selinux/config file to change the selinux=enforcing to selinux=disabled restart the machine
Linux Network Management