Skip to main content
Skip table of contents

How to use your own virtual firewall with Copaco VMware Cloud

Summary

In some cases you want to deploy your own virtual firewall. It is not possible to have a direct internet connection to your virtual firewall since the edge is the demarcation point.

This article describes how you can use your own virtual firewall behind the Copaco VMware Cloud edge.

image-20240321-145253.png

Prerequisites

  • An active Copaco VMware Cloud subscription;

  • Deployed the virtual appliance.

Getting Started

This article is divided into 5 parts. You may use the ‘on this page’ section to skip to a different part easily.

Creating required networks

To correctly do this, two Copaco VMware Cloud networks need to be created.

  • WAN network: this network is a routed network and only used for the connection between the virtual firewall and edge.

  • LAN network: this network is a isolated network and used for LAN traffic and is used for the VMs behind the virtual firewall.

  1. Click Networks and click New.

    image-20240320-160328.png

  2. Select Current Organization Virtual Data Center and click Next.

    image-20240320-160808.png

  3. Select Routed and click Next.

    image-20240320-161206.png

  4. Select the edge and click Next.

    image-20240320-163246.png

  5. Enter the name “WAN”, fill in the gateway CIDR and click Next.
    In this example we will use the 192.168.10.0/24 subnet with a gateway address 192.168.10.1.

    image-20240320-162948.png

  6. Optional you can use an IP pool 192.168.10.2 -192.168.10.4 since only the virtual firewall will be a member of this “WAN” network. Click Add and Next.

    image-20240320-162152.png

  7. Untick “Use Edge DNS” and specify your DNS servers (you can also use other public DNS servers) and click Next.

    image-20240320-162755.png

  8. Review the configuration and click Finish.

    image-20240320-163552.png


    Now we will to create the LAN network.

  9. Click on Networks, and click New.

    image-20240320-164008.png

  10. Select Current Organization Virtual Data Center and click Next.

    image-20240320-160808.png

  11. Select Isolated and click Next.

    image-20240320-164339.png

  12. Enter the name “LAN”, fill in the gateway CIDR and click Next.
    In this example we going to use the 192.168.20.0/24 subnet with a gateway address 192.168.20.1.

    image-20240320-164812.png

  13. Optional you can use an IP pool 192.168.20.2 -192.168.20.100 where the virtual firewall will be a member together with all other VMs of this isolated LAN network. Click Add and Next.

    image-20240320-165336.png

  14. Optionally: Specify your DNS server and click Next.

    image-20240320-170559.png

  15. Verify the configuration and click Finish.

    image-20240320-170742.png

  16. The two networks are created.

    image-20240320-171059.png

Connecting the networks

Now the networks are created, both the LAN and WAN networks need to be connected to the virtual firewall. The LAN Network also needs to be connected to the VMs.

In this example we are going to assign the IP address for the virtual firewall WAN interface 192.168.10.3 and for the LAN interface 192.168.20.3. For the VM LAN interface we are going to use the 192.168.20.4

  1. Go to Virtual Machines and click on DETAILS for the virtual firewall.

    image-20240321-084838.png

  2. Click NICs.

    image-20240321-085045.png

  3. Click Edit.

    image-20240321-090141.png

  4. Change the Network, IP Mode and IP settings for the WAN network and click Save.
    Adapter Type VMXNET3 (only if it is supported by vendor; check vendor documentation, otherwise you can choose E1000E)
    Network WAN
    IP Mode Static - Manual
    IP 192.168.10.3

    image-20240321-091432.png

  5. .Click New.

    image-20240321-092144.png

  6. Change the Network, IP Mode and IP settings for the LAN network and click Save.
    Adapter Type VMXNET3 (only if it is supported by vendor; check vendor documentation, otherwise you can choose E1000E)
    Network LAN
    IP Mode Static - Manual
    IP 192.168.20.3

    image-20240321-092541.png

  7. The networks are attached to the Virtual_Firewall.

    image-20240321-093041.png

  8. Go back to Virtual Machines and click on DETAILS for the VM.

    image-20240321-093214.png

  9. Click NICs, and click Edit

    image-20240321-093419.png

  10. Click New (or edit).

    image-20240321-093551.png

  11. Change the Network, IP Mode and IP settings for the VM and click Save.
    Here yo need to specify the following:
    Adapter Type VMXNET3
    Network LAN
    IP Mode Static - Manual
    IP 192.168.20.5

    image-20240321-093918.png

  12. Now the network is attached to the VM.

    image-20240321-094040.png

Configure NICs

After the WAN and LAN networks are connected, they need to be configured. Configuring them depends on the type and vendor used. For the WAN interface you should select the interface which is created during the network creation, which in our example is: 192.186.10.3 and for the LAN interface it should be 192.168.20.3.

On the VMs you must specify the LAN interface IP address of the virtual firewall as the gateway.

image-20240321-095401.png

Creating Edge Firewall Rules

Now you need to create the following Edge Firewall Rules;

  • A Rule to forward all the traffic from the edge to the Virtual Firewall.

  • A Rule to forward all the traffic from the Virtual Firewall to the Edge.

  1. Click Edges.

    image-20240321-095838.png

  2. Click on the name of the edge.

    image-20240321-100016.png

  3. Click IP settings and write down the IP address under IP addresses, you need this during configuration of the firewall rules.

    image-20240321-143915.png

  4. Click SERVICES.

    image-20240321-144015.png

  5. Click on Firewall and toggle Show only user-defined rules ON.

    image-20240321-100436.png

  6. Click the + sign.

    image-20240321-101312.png

  7. Create a firewall rule with the following settings and click Save changes.
    Name incoming traffic
    Source Any
    Destination the IP address that you have found in step 3
    Service Any
    Action Any

  8. Click in destination column on IP.

    image-20240321-113406.png

  9. Enter the IP address and click Keep.

    image-20240321-144109.png

  10. Click the + sign to add the outgoing rule.

    image-20240321-144146.png

  11. Create a firewall rule with the following settings and click Save changes.
    Name outgoing traffic
    Source WAN IP from the virtual firewall (192.168.10.3)
    Destination Any
    Service Any
    Action Any

    image-20240321-144302.png

Configuring the Edge NAT Rules

Now you need to create the following NAT rules;

  • A Nat rule that will NAT all incoming traffic to the Virtual Firewall

  • A Nat rule that will NAT all outgoing traffic to the Edge

  1. Go to NAT.

    image-20240321-145120.png

  2. Click on + DNAT Rule

    image-20240321-114021.png

  3. Click SELECT to select the edge IP.

    image-20240321-114139.png

  4. Click KEEP.

    image-20240321-144447.png

  5. Specify the WAN IP from the virtual firewall (192.168.10.3) as Translated IP and give it a description. Click KEEP.

    image-20240321-144534.png

  6. Click on + SNAT Rule for creating the outgoing NAT rule.

    image-20240321-144611.png

  7. Specify the WAN IP from the Virtual Firewall as Original Source IP and select the public IP from the edge as translated source IP and click KEEP.

    image-20240321-144700.png

  8. Click Save changes.

    image-20240321-144751.png

  9. The incoming and outgoing traffic is now going through your own virtual firewall.

    image-20240321-144855.png


































JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.