TransWikia.com

Firewall on VirtualBox

Super User Asked by Rbuckle on November 24, 2021

I believe I have researched my question and have not found a answer.

I have installed Virtual Box on top of Windows 10×64 and then installed three different virtual operating systems; Windows 7, Windows Server 12R2 and Ubuntu. I have a router with basic firewall abilities, which is turned on and tuned to my environment.

But I am looking to make sure, my virtual environment has a layer of security as well. If I where to install a virtual firewall in virtual box, such as OPNsense.

Do I need to add OPSense virtual firewall to each OS installation?

Link to OPNSense: https://linoxide.com/firewall/install-opnsense-virtualbox

Thanks

One Answer

It depends on your Virtualbox network configuration.

If you use NAT, all virtual machines will connect to internet through Windows 10 x64, they will use your computer's internet and they cannot access to the router. But if you use Bridge Mode, all of them will access to the router, and they will connect to internet through the router.

I advise you to protect computer's internet connection and then share it with the virtual machines with NAT option.

To protect your computer's internet connection, you can use Opsense: Opsense requires two network interface cards(nic). First nic is for wan connection, the second is for lan connection.

So I assume you have one Nic, you need the second nic. So install "Microsoft Loopback Adapter"

When creating Opsense, use two nics with Bridge Mode. One is for incoming connections. The other is for ongoing connections. Opsense will take incoming connections and then checks the content. And we will get internet connection from it.

1.First Network adapter: Select your own adapter. It will connect to the router directly in Bridge Mode. 2.Second Network Adapter: Select Microsoft Loopback adapter. It will give us internet connection from Opsense.

After installing Opsense, set a fixed ip for your PC at DHCP settings in Opsense WEB GUI.

Finally, your computer will use internet connections from two nics. So you need to cut internet connection of your own network adapter. We want to use only the internet connection from Microsoft Loopback adapter.

So right click your nic. Disable IPv6. Enter the fixed ip settings of Opsense into IPv4 settings. Leave blank "dns gateway" setting. Now you are ready.

You can get detailed information at https://web.archive.org/web/20190624054042/http://timita.org/wordpress/2011/07/29/protect-your-windows-laptop-with-pfsense-and-virtualbox-part-1-preamble/

Answered by murat.karagoz on November 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP