Linux Network related
Ifconfig-AH no IP or network card when it's down without IP
Ifdown Ens33 Stop the NIC
Ifup Ens33
Restart finger ifdown &&fiup Fixed network card
Setting up a virtual network card
Enter Profile Copy File
Modify a file
Name=
Device=
ip=
Restart the NIC Ifdown &&fiup
The Ping network card can pass
Mii-tool network card name link is ok there is no link cable
Ethtoll NIC Name Yes
Hostnamectl setting the hostname configuration file/etc/hostname
DNS configuration file
/etc/hosts
Left IP right domain one line inside an IP can match multiple domain names
The last line is valid for line breaks.
Linux Firewall
Temporary shutdown Setenforce 0
Permanently close edit Config file modified to Disabled
Getenforce view enforcing off permissive encounter blocking to alert
CENTOS6 firewall netfilter >centos7 wall FIREWALLD--iptables firewall mechanism not the same as tool usage
Enable SELinux to increase service costs many things are limited by
Systemctl Disable FIREWALLD First stop no boot
Stop service again
Systemctl Stop Firewalld
Post-Installation Services Systemctl enable Iptables
Open service
View the default rule IPTABLES-NVL
Open NetFilter not go
NetFilter
NetFilter of 5 Tables
Man iptables CENTOS6 only 4 tables
Filter:input Incoming chain detection source IP forward determine if the destination address is native OUTput package of native
shared Internet, port mapping nat:prerouting used to change incoming packets postrouting go out and change the packet
Port mapping: A want to access C host A is public IP c is private network IP cannot communicate directly need to go through the B-port mapping
b host needs to set iptables rules for NAT
Iptables rules
View Default Rules
Default rule file Address/etc/sysconfig/iptable
The purge rule reboot will load the rules in the config file serviece iptables Save the current rule
Rules for the filter table
Rules for NAT tables
Iptables-z bytes The first packet the second amount of data
Add rule-T No add-t default is the filter table
-A add chain is input-s Source-p Specify protocol--sport source Port-D destination IP--doprt destination port-j Last action drop discard/reject reject after reading
-I shorthand only specifies the port to insert the rule in front of the queue first priority filter
Delete rule-D
Forgot to write the rule command Delete method print serial number
Delete Serial number directly
-P Modify Default policy
Linux Network related