Centos – configuring virtualbox bridged adapter
Here is how you will set your virtual centos machine to connect to the internet. First your virtual machine must be using a bridged adapter, running ifconfig will give you something like this.
This means that eth0 is not yet configured. We need to manually configure it in order to connect to our local network. First, you must edit ifcfg-eth0 configuration file.
Change ONBOOT parameter to yes.
If you want a static IP address just change the BOOTPROTO to static and put your desired IP address along with the netmask like this.
Also, make sure you set your gateway IP too. Just edit your network file
Next, we need to tell our server where to look for domains. Edit resolv.conf file
and use Google’s public DNS.
Restart the network service and ping google.com!
service network restart
Not convinced? Download somefiles! 😀