Skip to content

Instantly share code, notes, and snippets.

@cmp-cc
Last active March 10, 2017 01:43
Show Gist options
  • Save cmp-cc/46feb5ad5273fe85c1b9f909ce0772bd to your computer and use it in GitHub Desktop.
Save cmp-cc/46feb5ad5273fe85c1b9f909ce0772bd to your computer and use it in GitHub Desktop.
# 默认是关闭网卡的, 需开启
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
```
sudo yum install net-tools # ipconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment