Configure Cisco switches to use the TACACS+ server

In this topic, you will learn how to configure a Cisco switch running Cisco IOS 15.0 to authenticate, authorize, and log administrators with the Portnox™ local TACACS+ server.

Before you begin, make sure that you have the following:

  • A local TACACS+ server, deployed as a virtual machine or a container, and online in Portnox Cloud.

    For more information, see the following topics: Set up a local TACACS+ server using a virtual machine, Run the local TACACS+ server in a container.

  • The IP address of the local TACACS+ server.

    To find it, go to Settings > Services > LOCAL TACACS+ SERVICE > Local TACACS+ profile. The IP address appears next to the server status.

  • The shared secret of the local TACACS+ server.

    To copy it, go to Settings > Services > LOCAL TACACS+ SERVICE > Local TACACS+ profile, click on the Edit link next to your server, and click on the  ⧉  icon next to the Shared Secret field.

  • A local administrator account on the NAS device for emergency access (break-glass account).

  • A network path from the NAS device to the local TACACS+ server on TCP port 49, with no NAT between them.

    Note:
    The local TACACS+ server identifies NAS devices by their source IP address. With NAT, several NAS devices appear as one.
  • Command-line access to the switch with privilege level 15, over SSH or the console.

Important:
TACACS+ authenticates administrators with credentials (username and password). The Portnox Cloud accounts of NAS device administrators must exist and must be able to authenticate with credentials. If your Entra ID access policy enforces multi-factor authentication, set up an MFA bypass. Without it, Portnox Cloud alerts show a successful authentication but the NAS device keeps asking for the password. For more information, see the following topic: Bypass multi-factor authentication in Entra ID. If you use Google Workspace accounts, administrators must log in with an app password, not their regular password. For more information, see the following topic: Integrate with Google Workspace. If you have only a few NAS device administrators, the easiest option is to create Portnox accounts for them. These accounts use a password that you set in Portnox Cloud. For more information, see the following topic: Create an account.
Important:
This guide applies to Cisco switches running Cisco IOS 15.0. Other Cisco IOS and IOS XE versions may use different commands.
Note:
We tested this guide on a Cisco Catalyst 3560-X switch (WS-C3560X-24P) with Cisco IOS 15.0(1)SE2.
Important:
This guide gives general instructions for integrating Portnox Cloud with specific third-party devices. We try to provide useful examples for common models, but settings can differ between manufacturers, models, and environments. Because of this, we cannot guarantee these steps will work in every case. TACACS+ is an industry standard and not specific to Portnox. For questions or problems with TACACS+ setup, device-specific settings, or troubleshooting, we recommend checking the device manufacturer’s documentation and contacting their support team. Portnox Support can help when possible, but detailed setup of third-party devices is usually best handled by the manufacturer. We also recommend updating your device firmware to the latest version, as old firmware can cause issues.
Important:
All values in this configuration are examples. In this guide, the local TACACS+ server uses the IP address 10.0.0.247 and the shared secret Qm4vT8rLx2NcW7pZ9kYb3HdF, the switch uses the IP address 10.0.0.230, and the administrator is kosh@vorlon.com. Make sure to adjust the configuration to your individual profile names, TACACS+ server addresses, ports, and keys.

Configure the Cisco switch

In this section, you will learn how to add the local TACACS+ server to a Cisco switch and use it for administrator authentication, authorization, and accounting.

Warning:
Keep your current session on the switch open until a TACACS+ login works. Save the configuration only after a successful TACACS+ login, in the last step of this guide. Until then, a reload of the switch restores the previous configuration.
  1. Log in to the switch and enter global configuration mode.
    configure terminal
  2. Optional: If the switch has no local administrator account yet, create one for emergency access.
    username breakglass privilege 15 secret local_password
  3. Turn on AAA.
    aaa new-model
  4. Add the local TACACS+ server and its shared secret.
    tacacs-server host 10.0.0.247 key Qm4vT8rLx2NcW7pZ9kYb3HdF
  5. Set the TACACS+ timeout.
    tacacs-server timeout 20

    If you use multi-factor authentication (MFA), set the timeout to the same value as the Push-to-access notification timeout in the group settings (see the following topic: Set up multi-factor authentication for TACACS+).

  6. Optional: If the switch has several interfaces with IP addresses, set the source interface for TACACS+ traffic.
    ip tacacs source-interface Vlan12

    Use the interface that has the IP address of the switch that you use in the Portnox Cloud policy rule later. In this example, it’s Vlan12 with the IP address 10.0.0.230. To list the interfaces and their IP addresses, run the show ip interface brief command in privileged EXEC mode.

  7. Set TACACS+ as the login authentication method, with local accounts as the fallback.
    aaa authentication login default group tacacs+ local

    The switch uses local accounts when the local TACACS+ server is unreachable.

  8. Optional: For testing, set the console to use local accounts only.
    aaa authentication login CONSOLE local
    line con 0
     login authentication CONSOLE
     exit

    During testing, the console then works even when the local TACACS+ server is unreachable, and doesn’t wait for the TACACS+ timeout.

    After a TACACS+ login works, switch the console back to TACACS+ in configuration mode:

    line con 0
     no login authentication CONSOLE
     exit
    no aaa authentication login CONSOLE local
  9. Set TACACS+ as the authorization method for sessions.
    aaa authorization exec default group tacacs+ if-authenticated
    Note:
    This guide uses session-based authorization. Cisco switches also support command-based authorization, which checks each command with the TACACS+ server.
  10. Set TACACS+ as the accounting method for sessions.
    aaa accounting exec default start-stop group tacacs+
  11. Exit configuration mode.
    end

Configure Portnox Cloud

In this section, you will learn how to create a TACACS+ authorization policy for the switch in Portnox Cloud, assign it to the group of switch administrators, and save the switch configuration.

  1. In Portnox Cloud, go to Policies > TACACS+ AUTHORIZATION POLICIES and click on the Create policy button.

  2. In the policy editor, configure the TACACS+ authorization policy for the switch.

    1. In the Policy Name field, enter a name for the policy.

      In this example, we used the name Cisco Admins but you can use any name you like.

    2. On the left-hand side, keep the default Session-based option selected.
    3. In the Privilege level field, enter 15.
    4. In the Allowed services section, keep the default shell service.
  3. Click on the Save changes button.

    For more information about configuring TACACS+ policies, see the following topic: Create or edit a TACACS+ authorization policy.

  4. In Portnox Cloud, go to Groups >  ⋮  > Group policies for the group of NAS device administrators.
    Note:
    If you don’t have a group yet, create the group first. For more information, see the following topic: Create a group.

  5. Scroll down to the TACACS+ policies section and click on the Add a TACACS+ policy link.

  6. In the TACACS+ policies section, configure the new policy row.

    1. In the TACACS+ POLICY column, select the policy that you created earlier.
    2. In the APPLIED TO column, click on the  ✎  icon.
  7. In the APPLY TACACS+ POLICY window, apply the policy to the switch.

    1. Create a rule with the following values: NAS, IpAddress, Equals, and the IP address of the NAS device.

      In this example, we used the IP address 10.0.0.230.

    2. Click on the Save button.
  8. Log in to the switch over SSH with a Portnox Cloud account from the group.
    ssh -l kosh@vorlon.com 10.0.0.230
  9. After the TACACS+ login works, save the configuration on the switch.
    write memory

Administrators log in to the switch with their Portnox Cloud credentials. Portnox Cloud logs each login.

If administrators cannot log in, see the following topic: How to troubleshoot problems with TACACS+.