Last active
March 10, 2017 01:43
-
-
Save cmp-cc/46feb5ad5273fe85c1b9f909ce0772bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 默认是关闭网卡的, 需开启 | |
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 | |
ONBOOT=yes | |
service network restart | |
# centos7 无`ifconfig`、`netstat`、`route`、`arp` | |
使用 ip指令,ss指令和NetworkManager的两个工具 nmtui,nmcli 取代 | |
# 使用iptables | |
centos7 默认防火墙为firewalld,iptables 更加亲切 | |
禁用firewalld 相关命令: | |
``` | |
systemctl stop firewalld.service **停止firewall** | |
systemctl disable firewalld.service **禁止firewall开机启动** | |
``` | |
##安装iptables-services | |
``` | |
yum install iptables-services | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install net-tools # ipconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment