Friday, January 5, 2018

Create a VM network in Parallels with a Linux VM Firewall

Parallels Desktop has been a solid virtualization option for my iMac.  It enables easy sharing of folders and other advanced options I felt would be useful, i.e. seamless Windows programs.  For my latest adventure I wanted to test out some Linux firewall configurations without messing around with my physical environment.  So, I did the following to create a network where the linux firewall can serve both as a gateway and DHCP server.

Create the virtual network

  1. Open up Parallels Desktop Preferences
  2. Go to Network tab
  3. First take note of the IP address of the Shared network (for configuring your linux firewall)
  4. Then click the plus to create a new "Host-Only" network
  5. Uncheck "Connect Mac to this network"
  6. Uncheck "Enable IPv4 DHCP"
  7. Uncheck "Enable IPv6 DHCP"

FYI: The IP addresses shown will not be used because the linux firewall will respond to DHCP requests.

Configure the linux firewall

Set up two network interfaces on the VM before installing your favorite linux firewall, i.e. pfSense, Untangle, CentOS, or Sophos UTM.
  1. Open the configuration for your new VM
  2. Go to Hardware tab
  3. Configure Network 1 to have a source of "Default Adapter."  That network will have a connection regardless of whether your iMac connects via wireless or wired.
  4. Create a new network interface
  5. Select the "Host-Only #2" network we created in the prior section
    Make a note of the MAC address for this network for when you configure your firewall
  6. Now boot and install your linux firewall



No comments:

Post a Comment