Page 1 of 1

Using the physical NIC in Guest to have a extern Firewall

Posted: 3. Nov 2009, 23:50
by wiseguy
Hallo,

I want to have a extern Firewall through VirtualBox. That means, that I have a guest (e.g. Linux OS) which is connected directly by WLAN to a network. (the host (Windows 7) has to give that hardware or functionality to this guest). And than the guest gives is the gateway for the host and all other guests.

So the Way from the host to the network (Internet) is as following:
Host ---virtual NIC---> Client (e.g. Debian) ---Physical WLAN NIC---> network (WLAN) which is connectet to the Internet how ever

And the Way from other Clients to the network (internet) is as following:
Client (e.g. Windows XP) ---virtual NIC---> Host ---virtual NIC---> Client (e.g. Debian) ---Physical WLAN NIC---> network (WLAN) which is connectet to the Internet how ever


Is that posible?

Re: Using the physical NIC in Guest to have a extern Firewall

Posted: 4. Nov 2009, 03:36
by BillG
Yes, you can do that. There are two basic changes you need to make.

The first is to prevent the host from directly accessing the network. To do that, you change the NIC settings by clearing the check marks from all boxes except the VirtualBox network. You must leave this one checked so that the vm can access the network through this NIC.

The second thing to do is modify the host only network so that you can use it as your private network behind your vm firewall. I would turn off the DHCP server and manually configure your network settings.

From there on the setup is identical to a physical network doing the same thing. You configure the firewall vm with two NICs. The "public" NIC connects to the physical LAN through the physical NIC in the host. The second NIC is in the host only network and is the gateway for your private network. eg

Physical LAN
|
LAN IP netmask and gateway
firewall vm
192.168.56.254 dg blank

Re: Using the physical NIC in Guest to have a extern Firewall

Posted: 4. Nov 2009, 03:46
by BillG
Sorry, pressed the wrong button.

LAN IP etc eth0
firewall vm
192.168.56.254 dg blank eth1 host only network
|
other vms
192.168.56.x dg 192.168.56.254 host only network
|
host (host only NIC)
192.168.56.y dg 192.168.56.254

I don't have a Linux guest to test this on but it works with Server 2003 RRAS/NAT as the router, so the network config works.