Configure NAS devices to use the TACACS+ server

In this topic, you will find general instructions on how to configure a NAS device 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.
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.

A NAS device can be a switch, a router, a firewall, a wireless controller, or any other network device that supports TACACS+. Some devices are configured with a web interface, others with commands. Manufacturers use different names for the same settings, for example, TACACS+ server, AAA server, remote authentication server, server profile, or server group.

Important:
This guide gives general instructions for integrating Portnox Cloud with third-party devices. Settings 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 192.168.1.200 and the shared secret Hy9LJNsqMeB39BYzxZvK3WQ3, the NAS device uses the IP address 192.168.1.2, 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 NAS device

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

  1. On the NAS device, add the local TACACS+ server.

    In a web interface, look for a menu such as Device > Server Profiles > TACACS+ or User & Authentication > TACACS+ Servers. On a command line, the command usually looks like one of the following examples:

    tacacs-server host 192.168.1.200 key Hy9LJNsqMeB39BYzxZvK3WQ3
    tacacs server PORTNOX
     address ipv4 192.168.1.200
     key Hy9LJNsqMeB39BYzxZvK3WQ3
    set system tacplus-server 192.168.1.200 secret Hy9LJNsqMeB39BYzxZvK3WQ3
    1. Specify the IP address of the local TACACS+ server.

      In a web interface, enter the IP address in the server address field. On a command line, add the IP address to the server command, as shown in the examples above.

      Note:
      Use the IP address, not the host name. The NAS device then doesn’t depend on DNS to reach the server.
    2. If the device lets you specify a port, specify 49.

      In a web interface, enter the port in the port field. On a command line, add the port to the server command, usually with the port keyword. Most devices use port 49 by default.

    3. Specify the shared secret of the local TACACS+ server.

      In a web interface, enter the shared secret in the secret field. Some devices ask you to enter it twice. On a command line, add the shared secret to the server command, usually with the key or secret keyword.

      Note:
      Some devices call this value key, secret, or passkey. Some devices also ask whether the value is plain text or encrypted. Choose plain text.
    4. If the device lets you choose an authentication protocol, choose PAP.

      In a web interface, select PAP in the authentication protocol field. On a command line, look for an authentication type setting, for example, tacacs-server auth-type pap.

      Note:
      CHAP doesn’t work with Portnox Cloud. With CHAP, the NAS device never sends the password. It sends a value calculated from the password, and the server can check this value only if it already knows the password. Portnox Cloud doesn’t store passwords. It checks each password with your authentication repository, for example, Entra ID, Google Workspace, or Okta, and these repositories accept only the password itself. With PAP, the NAS device sends the password, and TACACS+ encrypts the whole packet with the shared secret, so the password doesn’t travel in plain text.
  2. Set the TACACS+ timeout.

    If you don’t use multi-factor authentication (MFA), the device default is usually enough.

    If you use 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+). If the NAS device timeout is shorter, the login fails before the administrator can approve the MFA request. Some devices allow a maximum of 20 or 60 seconds. Select a group timeout that all your NAS devices support.

    On a command line, the command usually looks like this:

    tacacs-server timeout 20
  3. Optional: If the NAS device has several interfaces, set the source interface or source IP address for TACACS+ traffic.

    The local TACACS+ server identifies the NAS device by the source IP address of each connection. Without this setting, the device can send TACACS+ traffic from any of its interfaces. The source IP address must match the IP address that you use in the Portnox Cloud policy rule later.

    If the device uses a separate management interface or routing instance (VRF), make sure that the local TACACS+ server is reachable from it.

    On a command line, the command usually looks like one of the following examples:

    ip tacacs source-interface Vlan10
    set system tacplus-server 192.168.1.200 source-address 192.168.1.2
  4. Set TACACS+ as the authentication method for administrator logins, with local accounts as the fallback.
    Warning:
    Until you configure Portnox Cloud in the next section, TACACS+ logins fail. Keep your current session on the NAS device open until you confirm that a TACACS+ login works.

    In a web interface, look for settings such as authentication profile, authentication order, or management access. On a command line, the command usually looks like one of the following examples:

    aaa authentication login default group tacacs+ local
    set system authentication-order [tacplus password]

    On most devices, the local fallback works only when the TACACS+ server is unreachable. If the server rejects the login, the device doesn’t try local accounts.

    On many devices, a local account with the same username overrides TACACS+. Don’t create local accounts with the same usernames as Portnox Cloud users.

  5. Set TACACS+ as the authorization method.

    The NAS device decides whether it uses session-based or command-based authorization. Not all devices support both. Check your device documentation.

    • For session-based authorization, the device asks the TACACS+ server to authorize the session once, after login. The administrator then gets the privilege level or role from the Portnox Cloud policy. Use this option if you only need to control who can log in and with which privileges.

      On a command line, the command usually looks like this:

      aaa authorization exec default group tacacs+ if-authenticated

      In a web interface, look for an option such as Retrieve user group from TACACS+ or Use TACACS+ for authorization.

    • For command-based authorization, the device asks the TACACS+ server to authorize each command that the administrator runs. Use this option if you want to allow or block specific commands.

      On a command line, the command usually looks like this:

      aaa authorization commands 15 default group tacacs+ if-authenticated
  6. Optional: Set TACACS+ as the accounting method.

    With accounting, the NAS device reports administrator activity to the TACACS+ server. You can then see logins, logouts, and commands in Portnox Cloud alerts and troubleshooting logs.

    On a command line, the commands usually look like this:

    aaa accounting exec default start-stop group tacacs+
    aaa accounting commands 15 default start-stop group tacacs+

    On many devices, command accounting works only for the privilege levels that you list. If Portnox Cloud shows logins but no commands, add command accounting for the privilege levels that your administrators use.

  7. Optional: If the NAS device supports it, turn on TACACS+ caching.

    The local TACACS+ server doesn’t cache authentication and authorization information. If the Internet connection is lost, the server can’t reach Portnox Cloud and logins fail. With caching on the NAS device, administrators who logged in before can still log in.

  8. Save or commit the NAS device configuration.

    In a web interface, look for a Commit, Apply, or Save button. On a command line, the command usually looks like one of the following examples:

    write memory
    commit

Configure Portnox Cloud

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

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

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

    In this example, we used the name Network administrators but you can use any name you like.

  3. If your NAS device uses session-based authorization, configure the session-based settings.

    1. On the left-hand side, keep the default Session-based option selected.
    2. In the Privilege level field, enter the privilege level.

      Privilege level 15 usually gives full control of the NAS device. Privilege level 1 usually gives read-only access.

      In this example, we used the privilege level 15.

    3. Optional: In the Session timeout field, select the session timeout in minutes.

      The value 0 means no timeout.

    4. Optional: In the Allowed services section, click on the Add new link, enter the service name, and click on the Add button.

      By default, only the shell service is allowed. Some devices require their own service name. Check your device documentation.

    5. Optional: In the Custom attributes section, click on the Add new link, enter the Key and the Value, and click on the Add button.

      Many devices, mainly firewalls, assign administrator roles through custom attributes instead of privilege levels. Check your device documentation for the attribute names and values.

  4. If your NAS device uses command-based authorization, configure the command-based settings.

    1. On the left-hand side, click on the Command-based option.
    2. Optional: To allow only the commands that you list, select the Deny access to all commands by default checkbox.

      If you don’t select this checkbox, administrators can run all commands except the ones that you list.

    3. In the Forbidden/Allowed commands section, click on the Add new link, enter the command, and click on the Add button.

      In this example, we added the reload command to the list of forbidden commands.

    4. Optional: In the Custom attributes section, click on the Add new link, enter the Key and the Value, and click on the Add button.

      Portnox Cloud sends custom attributes to the NAS device together with each command authorization. Add them only if your device needs extra settings in the response. These can be standard TACACS+ attributes, such as idletime or nohangup, or attributes specific to your device. Check your device documentation for the attribute names and values.

  5. Click on the Save changes button.

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

  6. 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.

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

  8. 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.
  9. In the APPLY TACACS+ POLICY window, apply the policy to the NAS device.

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

      Use the source IP address that the NAS device uses for TACACS+ traffic.

      In this example, we used the IP address 192.168.1.2.

    2. Click on the Save button.

Administrators log in to the NAS device with their Portnox Cloud credentials, usually their full email address. For example, over SSH: ssh kosh@vorlon.com@192.168.1.2. The NAS device grants the privileges from the Portnox Cloud TACACS+ authorization policy. Portnox Cloud logs each login.

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