Change network config
vi /etc/sysconfig/network-scripts/ifcfg-eth0 (or ifcfg-eX named)
ONBOOT="NO"
->
ONBOOT="YES"
Save and restart network with the following command
service network restart
Change network mode from NAT mode to Bridged mode.
if need ifconfig, yum install net-tools
if need iptables,
yum install iptables-services
systemctl mask firewalld
systemctl stop firewalld
systemctl enable iptables
systemctl enable ip6tables
systemctl start iptables
systemctl start ip6tables
if want to enable ping,
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT
service iptables save
systemctl restart iptables
if want to enable ssh, check ssh server is installed and add to iptables
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name ssh --rsource
0 nhận xét:
Đăng nhận xét