Modify the IP address and turn off boot Firewall 1, ifconfig view ip2, if there is no network card to see if Ifcfg-eth0 file exists cd/etc/sysconfig/network-scripts/ls-s view if there is View Device=eth0 HWADDR=00:0C:29:0f:b8:70 These two options with vi/etc/udev/rules.d/70- persistent-net.rules is the same as eth0 if not, use the eth1 NIC vi/etc/udev/rules.d/70- Persistent-net.rules View MAC addresses in eth0 and eth1 eth1 Nic's MAC address 00:0c:29:50:bd:17 then modify vi/etc/sysconfig/network-scripts/ifcfg-eth0 Modify device=eth1 hwaddr=00:0c:29:0f :b8:70 Restart the NIC service network RESTART3 If the network card already exists 1 temporary modification ifconfig eth0 172.16.10.82 2 Perpetual modification Example: fixed IP by the original DHCP
device=eth0hwaddr=00:0c:29:f7:ef:bfonboot=yestype=ethernetnetmask=255.255.255.0ipaddr=192.168.0.68gateway= 192.168.0.1 Restart/etc/init.d/network Restart ####################### #防火墙设置
1. Permanent effect after reboot
Open: Chkconfig iptables on
OFF: Chkconfig iptables off
2, immediate effect, after restart failure:
Open: Service iptables start
Close: Service iptables stop
/etc/init.d/iptables status will get a series of messages stating that the firewall is open.
/etc/rc.d/init.d/iptables Stop shutting down the firewall
/etc/init.d/iptables stop
Linux modifies IP address and shuts down firewall settings