Securing EOS CLI
Securing EOS CLI
Securing EOS CLI
com
https://eos.arista.com/securing-eos-cli/
Objective
This Tech Tip is intended to provide Arista EOS users with the configuration guidelines and best practices to enable secure management plane
protocols according to IT industry security standards. It is not the objective of this document to set the foundations or rules of a company security
policy or a password policy.
Note: This document is not intended to set company security or password policy. Ultimate responsible to define and apply an end-to-end IT security
policy is the responsibility of the end user and must take into account any regulations directly related with company activities.
Arista EOS includes a wide range of industry standard management protocols. Some of these protocols, for example Telnet or HTTP, are insecure
in nature and should be avoided whenever is possible and, instead, use secure alternatives provided by Arista EOS. Some of the examples
exhibited in this Tech Tip do not show all the available options in Arista EOS and the author encourages the readers to review the Arista EOS User
Manual and apply the configurations that best adapts to the company security policy.
Requisites
The features and examples documented in this Tech Tip are based on Arista EOS Version 4.13.1F. It is assumed that readers are familiar with
Arista EOS CLI in particular and with management protocols in general.
Enable Password
As a part of the local authentication, the enable password command gives local users access to Privileged EXEC mode from EXEC mode. By
default, this password is not configured. Since this password authorizes access to the Privileged EXEC mode, it is recommended to configure it.
Configuring the enable secret password:
Arista(config)#enable secret
the connection with the servers is lost. To minimize the number of fallbacks to the local database, and as a general best practice, configure at least
two servers.
admin
[admin@Arista ~]$
On the other hand, remote direct access to the bash through SSH or Telnet is restricted to the root user. The root user is a special user and, like
the admin user, cannot be deleted or edited.
Unlike the standard users, the root password is configured by typing aaa root in configuration mode:
switch(config)#aaa root secret
Assigning a password to the root user is also necessary to execute commands in root mode when logged in the bash with a different user:
Arista#bash
Arista Networks EOS shell
[admin@switch ~]$ su
Password:
bash-4.1# whoami
root
bash-4.1#
Although SNMP v3 does not change the foundations of the protocol operation, it does bring important security features that should be enabled as a
general security best practice. In addition to username and password authentication, it also provides message integrity, and confidentiality through
the use of encryption.
SNMPv3 requires three steps to be configured in Arista EOS: view, group and user configuration. The following example shows how to configure a
read-only group and a user with access to all the MIBs:
Create SNMP View for all the MIBs:
Arista(config)#snmp-server view all . included
Create SNMPv3 group both with read access:
Arista(config)#snmp-server group noc v3 priv read all
Create SNMPv3 user john part of the noc team with authentication and privacy passphrases:
Arista(config)#snmp-server user john noc v3 auth sha priv aes
NOTE: For the list of the MIBs supported by Arista EOS, please refer to the following link: http://www.aristanetworks.com/support/aristasnmpmibs
Disabling SNMP
SNMP is disabled by default. If SNMP has been configured but a new security policy mandates to disable it, it can be done using the no snmpserver command:
Arista(config)#no snmp-server
Arista(config)#show snmp
SNMP agent enabled in VRFs: default
SNMP agent disabled: no communities or users configured
Command API
EOS Command API is Aristas JSON programmable interface that allows applications and administrators to have complete control over EOS using
industry standard CLI served over HTTP or HTTPS. The Command API is disabled (shutdown) by default and, once enabled, can be accessed over
HTTPS only. It is not recommended to enable HTTP unless is strictly necessary being that the username and passwords will be sent in clear text
over the network.
If your security policy requires to use your own certificates or certificates trusted by a Certification Authority rather than the one self signed by EOS,
this can be changed issuing the protocol https certificate command under the management api configuration sub-mode.
will be displayed if VRF configuration is tried on the physical management interface like:
Arista(config-if-Ma1)#vrf forwarding mgmt
% VRF configuration is not supported on this interface.
The next step is to configure the different VRF aware management protocols so they only work through the management interface and,
subsequently, the management VRF. At the time of this writing, the following protocols are configurable to work in VRF mode:
SSH
Telnet
Command API
XMPP
TACACS+
NTP
Syslog
DNS
For details on how to configure each one of the above protocols, please, refer to the Arista EOS User Manual.
Configuring VRF aware management is not mandatory and it needs to be determined based on customers requirements.
Idle Timeout
Idle timeout defines the connection period between the last command entered and the automatic connection shutdown. By default, idle timeouts
are set to zero, which means that the sessions will be never automatically disconnected. This can potentially become a security issue if the user
doesnt exit the console, Telnet, or SSH session. Especially in console sessions where an unauthorized user with physical access to the switch can
gain admin access through a console session left open. It is recommended, then, to configure idle timeouts.
The following example sets an idle timeout of 15 minutes to the console port:
Arista(config)#management console
Arista(config-mgmt-console)#idle-timeout 15
And the next example sets an idle timeout of 15 minutes to the SSH connections:
Arista(config)#management ssh
Arista(config-mgmt-ssh)#idle-timeout 15