Error Adding Firewall Rule in vCenter VAMI: 'Unexpected error occurred while adding the firewall rule. Error in method invocation Invalid interface name entered.'
search cancel

Error Adding Firewall Rule in vCenter VAMI: 'Unexpected error occurred while adding the firewall rule. Error in method invocation Invalid interface name entered.'

book

Article ID: 385034

calendar_today

Updated On:

Products

VMware vCenter Server VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

You are unable to add, edit, or remove firewall rules in vCenter by following the steps outlined here:
VMware Documentation.

When attempting to add a firewall rule, the following error appears:
"Unexpected error occurred while adding the firewall rule. Error in method invocation: Invalid interface name entered."

Cause

This issue may occur if the eth1 or another network interface was previously removed from the vCenter.

Resolution

  1. Shutdown vCenter.
  2. Take an offline snapshot of vCenter for backup purposes.
  3. Power vCenter back on.
  4. Connect to vCenter via SSH.
  5. Enter shell mode.
  6. Backup the current firewall configuration:
     
    cd /etc/vmware/appliance/
    cp firewall.conf firewall.conf.bak
  7. Use vi to remove all lines referencing the missing NIC:
     
    vi firewall.conf
    Example entry to remove:
     
    {
       "address": "0.0.0.0",
       "interface": "nic1",
       "policy": "ACCEPT",
       "prefix": 0
    }
  8. Save the changes:
    • Press esc
    • Type :wq! to save and exit.
  9. Reboot the vCenter server.
  10. Test the firewall settings by making a change in the VAMI interface.