網絡配置:
vi /etc/sysconfig/network-scripts/ifcfg-eth
BOOTPROTO=static
ONBOOT=yes
IP配置
IPADDR=192.168.31.102
NETMASK=255.255.255.0
GATEWAY=192.168.31.1
DNS1=192.168.31.1
redhat6:防火墻:
1. 永久性生效
開啟:
chkconfig iptables on
關閉:
chkconfig iptables off
2. 即時生效,重啟后失效
開啟:
service iptables start
關閉:
service iptables stop
redhat7:防火墻:
查看防火墻狀態。
systemctl status firewalld
臨時關閉防火墻命令。重啟電腦后,防火墻自動起來。
systemctl stop firewalld
永久關閉防火墻命令。
重啟后,防火墻不會自動啟動。
systemctl disable firewalld
打開防火墻命令。
systemctl enable firewalld