Configure Juniper Junos devices to use the TACACS+ server

In this topic, you will learn how to configure a Juniper device running Junos OS to authenticate 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.
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 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 Junos device

In this section, you will learn how to add the local TACACS+ server to a Junos device and use it for administrator authentication.

  1. Log in to the device and enter configuration mode.
    configure
  2. Add the local TACACS+ server and its shared secret.
    set system tacplus-server 192.168.1.200
    set system tacplus-server 192.168.1.200 secret Hy9LJNsqMeB39BYzxZvK3WQ3
  3. Set the source IP address for TACACS+ traffic.
    set system tacplus-server 192.168.1.200 source-address 192.168.1.2

    Use the IP address of the Junos device that you use in the Portnox Cloud policy rule later.

  4. Set the TACACS+ timeout.
    set system tacplus-server 192.168.1.200 timeout 45

    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+).

  5. Set TACACS+ as the first authentication method, with local passwords as the fallback.
    set system authentication-order [tacplus password]
    Warning:
    Keep your current session open until you confirm that a TACACS+ login works.
  6. Set the login class for TACACS+ users.
    set system login user remote class operator

    Junos uses the remote user as a template for administrators who log in with TACACS+ and have no local account. The operator class defines their permissions on the device.

  7. Commit the configuration.
    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+.