-1

I am using a dedicated server with a certain wan ip / netmask / gateway / nameservers. I got a second wan ip to use with virtualbox i installed on the server. I want to use bridge connection in virtualbox because i use some "servers" in it and want them to be able to be seen from internet .

I created a virtual network interface on the server and assigned the second ip to it. It works , meaning i can ping that ip from outside.I setup virtualbox to bridge to that interface but i am stuck at what settings i have to set up in the virtual guest so everything will work.

Second ip has netmask 255.255.255.255 so i assume its a single ip situation and probably using gateway and nameservers of the server because i was given none of them with it.

I have to mention that first ip and second ip are not in the same subnet , nor is the gateway (e.g. XX.YY.ZZ.WW , ZZ is different between first , second and gateway ip)

Thanks in advance.

Ben
  • 51,770
  • 36
  • 127
  • 149

1 Answers1

0

You have to unbind TCP and all other protocols and services on the hosts NIC that you want to use in VBox. After that, you can configure a bridged network connection using that interface. After that, you can set the IP and network settings in your virtual system. This has also been addressed in this post: https://serverfault.com/questions/136969/dedicate-a-nic-to-a-virtualbox-vm

Community
  • 1
  • 1
Rob
  • 11,492
  • 14
  • 59
  • 94
  • So if we are speaking about linux host , i just "flush" ip from that nic ?Anything more?And in the guest?What exactly i setup?i only have ip and netmask.Doesn't o/s need gateway and nameservers?Will it use them automatically from the host?Thanks for answering. – Angelos K. Dec 16 '13 at 09:23
  • I haven't tried under Linux yet, but I think that should do the job. You have to configure your interface just like a "real" one in your VM as you basically simply pass the hardware to VBox. You can set your nameservers in /etc/resolv.conf and your default gw with "route add default gw xxx.xxx.xxx.xxx". Alternatively, you can set these settings in /etc/network/interfaces or via a network manager. – Rob Dec 16 '13 at 09:24
  • So i have my virtual device on host (tap0 , i hope it does our job) , i set bridge mode in vbox to attach to tap0 , and booted my guest o/s.So i setup network settings inside guest as i was physically using that nic on host?IP and netmask i have.But gateway?Nameservers?Which ones i use?Do i use gateway/nameservers at all?Thanks again for answering. – Angelos K. Dec 16 '13 at 09:53
  • I can't quite follow you... think of it as if you have a second physical server. You have to specify your network settings just as you do with your other server. I don't know these settings, how should I, but your provider will.. ehm.. provide them ;) You can also try to obtain the settings automatically via DHCP. – Rob Dec 16 '13 at 10:02
  • ok let me be a bit more specific.This is a dedicated server talking directly to internet.It has no local ip.All ip/gateway/nameservers are statically assigned.1st ip is like 85.25.X.Y and gateway 85.25.X.Z . Nameservers are 85.25.128.X and 85.25.225.X (same letters represent same numbers). The second ip is like something of 85.25.110.WW , in entirely different subnet from all of the above but all ips can ping each other some magic from provider's side make them talk to each other.BUT inside virtual guest i cant set all these because they dont work.Either the bridging is wrong or i dont know... – Angelos K. Dec 16 '13 at 10:15