1

Ok, so I have a dedicated server with the static primary IP address 89.200.xx.xx, it's running 3 VM's in virtualbox (all Centos 6 as is the server) and I have 3 other IP's that I want to assign to the VM's (numbers omitted for obvious reasons):

  • 33.xxx.xxx.155
  • 33.xxx.xxx.160
  • 33.xxx.xxx.161

So I setup a bridge connection on the Centos 6 host and configured it to listen on eth0 and I assigned it the IP address 33.xxx.xxx.155. I then started the guest OS and configured it's static IP address to be 33.xxx.xxx.155 (this is after pointing the VB config at the bridge). I then tried to run "ifup eth0" and it returned "Error, some other host already uses address 33.xxx.xxx.155". OK. So I went back to the host and removed the bridges IP address. I then restarted the bridge and the virtual machine and assigned eth0 on the guest the IP address 33.xxx.xxx.155. Sure enough eth0 came up with that IP address, great! Except I can't access it. I have HTTPD running on the server and port 80 is correctly allowed in the IPtables but I can't see the server. I can't even ping it.

Any help would be appreciated, this is my first bridge network configuration.

Læti
  • 2,075
  • 21
  • 33
Compy
  • 111
  • 1
  • 3
  • Is this in Hetzner? – Michael Hampton Mar 07 '13 at 12:51
  • No. It's a UK dedicated hosting provider, but I don't particularly want to name them. – Compy Mar 07 '13 at 13:08
  • Can you reach the network from the virtual machine? – Michael Hampton Mar 07 '13 at 13:17
  • 1
    How are the 33.xxx addresses being routed to your server? This looks like a routing issue, either local to your VB host, or even at your LAN level. Can you also explain what you mean by /setting up/ or /restarting/ the bridge? Is this an ethernet bridge configured directly (linux) on the host or in the VirtualBox configuration? – Læti Mar 07 '13 at 13:37

2 Answers2

1

Most probably this happens because the IPs 33.xxx.xxx.xxx are not being routed into the network where the 89.xxx.xxx.xxx IP is located

Saying it in another way: you are placing 33.x.x.x IPs in a network which is prepared for 89.x.x.x IPs. The internet routers will not know that 33.x.x.x is inside the 89.x.x.x network, and so they cannot route packets into the 33.x.x.x IPs

To properly use the 33.x.x.x IPs, you must use them inside the ISP that gave you those IPs, because that ISP will have correctly setup the network 33.x.x.x where you can configure the 33.x.x.x IPs

Well, you can try to configure the VB-GUEST servers with "Host-only networking" and running services in different ports across the servers, and then goto the VB_HOST and configure it with PAT (port address tranlation), mapping each GUEST service into a different port on the public IP, so that the VB_HOST acts like a firewall for the VB_GUESTs.

Do notice that there would only be 1 public IP, the one of the VB_HOST, for all the services of the VB_GUESTs, and it's the PAT which will allow you to use the one public IP to access all the VB_GUESTs services.

Tell us how it went - cheers

zipizap
  • 111
  • 2
0

It seems you're trying to mix 2 different bridge implementations together.

VirtualBox has its own bridging implementation that does not rely on any setup of a linux bridge (br0 or alike). If, inside a guest configuration, you define a network interface to be attached to the Bridged Adapter that is all you need to do to actually build the ethernet bridge between the guest and the host interfaces. You don't need to play with brctl or other linux kernel tools to define the bridge.

That being said, you also need to provide routing for your other static IP addresses in some way. If your host is on a 89.200.xxx.xxx/something IP network, it will not receive any IP packet for the 33.xxx.xxx.xxx/something IP network.

If the 33.xxx.xxx.xxx network is actually arriving to your server, it must be through a second ethernet interface of the host. Be it eth1 and it should be assigned another (a 4th) IP address in the 33.xxx.xxx.xxx network. In the VirtualBox guest configuration window, in the network pane, your Bridged Adapter needs to use the eth1 interface and your guest should then become reachable (at least if your eth1 interface is also reachable).

Læti
  • 2,075
  • 21
  • 33