0

I have a Fedora virtual machine in VirtualBox, and I want to use Bridged Network Adapter for Internet connection.

What do I have to do to achieve this?

I have selected Bridged adapter from the Network menu in VirtualBox.

My Address on the host machine is configured statically. And I have no access to DHCP from my host machine.

Lets say my host machine IP information is-:

IP Address: 1.2.3.4
Subnet Mask: 255.255.255.0
Default gateway: 5.6.7.8

DNS: 8.8.8.8

I am on Windows 8.1 running a Fedora 24 guest. Is it possible to use Bridged Network Adapter for internet access ?

Please note my ISP allocates a static private IP per customer. That is every customer has an unique IP in the subnet.

  • @techraf My host machine IP information. – Kramer786 Sep 3 '16 at 12:18
  • And you are aware that 5.6.7.8 gateway makes no sense with 1.2.3.4 address, right? – techraf Sep 3 '16 at 12:25
  • @techraf Thats just an example. I did'nt want to put my actual IP Address here. – Kramer786 Sep 3 '16 at 12:29
  • You can make an example that makes sense and an example that doesn't make sense. Yours doesn't. – techraf Sep 3 '16 at 12:30
0

What do I have to do to achieve this?

You need just to set a static configuration on your Fedora in the same network as your host (as your example host configuration makes no sense, I assume 192.168.1.1 to be the gateway address). Basically with bridged networking only the IP address of the machine will differ between the host and the guest.

Assuming the host configuration is:

IP Address: 192.168.1.4
Subnet Mask: 255.255.255.0
Default gateway: 192.168.1.1
DNS: 8.8.8.8

You can set guest to:

IP Address: 192.168.1.5
Subnet Mask: 255.255.255.0
Default gateway: 192.168.1.1
DNS: 8.8.8.8

If you have one interface you need to set the following in ifcfg-eth0 file (refer to the documentation):

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=1.2.3.5
USERCTL=no
GATEWAY=1.2.3.5
DNS1=8.8.8.8
  • Is 192.168.1.1 the default gateway on my host system or is it the IP of the host system. – Kramer786 Sep 3 '16 at 12:31
  • The default gateway is the same on the host and guest. – techraf Sep 3 '16 at 12:36
  • No it didn't work. When I put in an IP say 172.16.130.197 I couldn't access my network since my ISP gives out connections based on IPs which means that IP is reserved for someone else. So what IP do I provide ? – Kramer786 Sep 3 '16 at 12:46
  • Also there is no seperate NIC showing up in my host operating system, when I go to "Open Network and Sharing" -> "Adapter Settings" – Kramer786 Sep 3 '16 at 12:49
  • And why should you have any separate NIC? You asked how to configure a VM with bridged networking and got the answer. – techraf Sep 3 '16 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.