All images courtesy of Microsoft

For my first attempt at a virtual lab to simulate an enterprise environment I was tempted to install devices listed in a reddit post that inspired me to start this project:

  • Virtual security appliances – firewalls etc
  • Virtual switches
  • Domain controller
  • DNS server
  • DHCP Server
  • SIEM
  • IDS
  • Endpoints
  • Active Directory
  • Groups

Clearly this would be trying to run before I could walk so I asked ChatGPT for a simple network to virtualise in Azure:

Sure! Here is a basic network setup that you can try to implement in Azure:

  1. Create a virtual network (VNet) in Azure. A VNet is a logically isolated section of Azure’s cloud network where you can create and manage your Azure resources.
  2. Create a subnet within the VNet. A subnet is a range of IP addresses within a VNet that you can use to segment your network.
  3. Create a network security group (NSG) and associate it with the subnet. An NSG is a firewall that controls inbound and outbound traffic to and from your resources.
  4. Create an Azure virtual machine (VM) and associate it with the subnet. An Azure VM is a virtual machine that runs in the cloud and can be used to host applications and services.
  5. Connect the VM to the Internet by creating a public IP address and associating it with the VM. A public IP address is an IP address that can be accessed from the Internet.
  6. Configure the NSG to allow inbound and outbound traffic to and from the VM. You can do this by creating inbound and outbound rules that specify the source and destination of the traffic and the port number.
  7. Test the network setup by connecting to the VM using Remote Desktop Protocol (RDP) or SSH. You can use RDP to connect to a Windows VM, and you can use SSH to connect to a Linux VM.

I hope this helps! Let me know if you have any questions.

So going from this:

Project Details

  1. Subscription = Primary_subscription
  2. Resource group = Basic_resourcegroup
  3. Virtual Network Name = Basic_vNW
  4. Region = UK South

Subnet

  1. Subnet = Basic_subnet
  2. Starting Address = 10.0.1.0
  3. Subnet size = /29 (8 addresses)
  4. No Security
  5. IP Address Space = 10.0.0.0 – 10.0.0.255 – No Gateway

Network Security Group

  1. NSG = Basic_nsg

Virtual Machine

  1. VM = BasicVM
  2. Size = Standard_B2ms ($0.1 per hour)
  3. Image = Win 10 Pro 21H2
  4. Admin = Basic_admin
  5. Password = *******************
  6. Public inbound ports = RDP 3389

Connect VM to Internet

  1. Public IP = *********

Configure NSG

  1. Inbound rule: Allow MyIPAddress – Port 3389 – TCP – Source 51.199.159.108 – Dest Any – Allow
  2. Inbound rule: AllowAnySSHInbound – Port 22 – TCP – Source Any – Dest Any – Allow
  3. Outbound rule: AllowCidrBlockHTTPSOutbound – Port 443 – TCP – Source 10.0.1.0/29 – Dest Any – Allow

Testing

  1. Testing the network by connecting via RDP does allow me to connect to the VM but I cannot ping it or connect via SSH at this time.

Conclusion

It seems that I managed to implement the virtual lab into Azure to a degree. There are still a lot of question marks about the virtual network and the network security group. The rules set in the NSG didn’t seem to have an effect on the VM so there’s work to be done there.