3

I am upgrading Ubuntu 8.04 on a dedicated router/firewall/NAT/SMTP/SSH server with a current Linux (Debian Wheezy). I am using VirtualBox (4.2) with Ubuntu 8.04 as host and the new Debian build as guest. Some preliminary testing has been done, the guest is running well and accessible through a bridged network adapter, and it's time to subject the guest to real traffic.

The host box has two NICs, WAN and LAN, and acts as firewall/NAT between them. I am looking for a way to test the guest's firewall, NAT, and other services, by routing (almost) all network traffic on the host's physical network adapters to the guest's adapters in a predictable way, e.g. guest's eth0 "takes over" all of host's eth0 traffic, and same for eth1.

Can this be done? How, at least in general terms? With rudimentary knowledge in this area, I am not finding an obvious way to proceed and whether this is primarily guest adapter configuration, host routing, port forwarding, or a combination. It would be acceptable for the host to essentially disappear from the network while the test is underway, accessible only through the console (in order to flip the switch back after testing is complete).

For example, although related, this question does not address either taking over all adapter traffic, or keeping a full-strength firewall in place. Same with many other resources found.

  • Ubuntu 8.04 has been EOL since May 9, 2013 – Elliott Frisch Apr 18 '14 at 17:25
  • Sure, but I don't think that's relevant to the question, right? – mklein9 Apr 18 '14 at 21:00
  • That's why it was a comment. – Elliott Frisch Apr 18 '14 at 22:15
2

Passing every packet received on an interface and forwarding on another one is one of the function of bridge. So you need :

  1. Configure the guest VM to use two internal adapter (i.e virtual adapter which connect host and guest. It's one of the possible mode of adapter in VirtualBox VMs.)
  2. Make two bridges in your host
  3. Bridge every guest interface with its respective interface in the host

Be careful! You will lost network access to your host. Use another way (e.g Mouse, keyboard and monitor) to access it.

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.