- Set virtual box like this:
- Log into Linux Centos and edit the file:
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 and modify the configuration like this in order to have a fix ip in your network and permit you to enter with a ssh console. (you have to modify the ip according to your network configuration.)
TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=enp0s3 UUID=6d9a4e86-ae47-456d-97ae-93ce156f9cd9 DEVICE=enp0s3 ONBOOT=yes IPADDR=192.168.178.131 NETMASK=255.255.255.0 GATEWAY=192.168.178.1 BNS=8.8.8.8
- Modify the file /etc/resolv.conf like :
nameserver 8.8.8.8
- restart the network service :service network restart
- check the configuration: ifconfig or ping your gateway