Skip to content

Azure virtual machine NIC has IP forwarding enabled

Description

By disabling IP forwarding on the NIC of your Azure virtual machine, you can help to prevent the virtual machine from acting as a router and forwarding traffic to unintended destinations. This can help to improve the security of your virtual machine and protect it from potential threats such as man-in-the-middle attacks or data breaches.

Fix - Buildtime

Terraform

  • Resource:azurerm_network_interface
  • Argument: enable_ip_forwarding
resource "azurerm_network_interface" "example" {
                  ...
 +                enable_ip_forwarding = false
                }