Juniper Networks
Log in
|
How to Buy
|
Contact Us
|
United States (Change)
Choose Country
Close

Choose Country

North America

  • United States

Europe

  • Deutschland - Germany
  • España - Spain
  • France
  • Italia - Italy
  • Россия - Russia
  • United Kingdom

Asia Pacific

  • Asean Region (Vietnam, Indonesia, Singapore, Malaysia)
  • Australia
  • 中国 - China
  • India
  • 日本 - Japan
  • 대한민국 - Korea
  • 台灣 - Taiwan
Solutions
Products & Services
Company
Partners
Support
Education
Community
Security Intelligence Center

Technical Documentation

Technical Documentation
 
CLI Explorer New
 
Content Explorer New
 
Documentation Help New
 
Enterprise MIBs
 
EOL Documentation
 
Feature Explorer Login required New
 
Glossary
 
Portable Libraries
 
Home > Support > Technical Documentation > Using Regular Expressions on a RADIUS or TACACS+ Server to Allow or Deny Access to Commands
Print
Rate and give feedback:  Feedback Received. Thank You!
Rate and give feedback: 
Close
This document helped resolve my issue.  Yes No

Additional Comments

800 characters remaining

May we contact you if necessary?

Name:  
E-mail: 
Submitting...

Supported Platforms Search

Advanced Search |  Search Tips
 

Supported Platforms

  • M Series
  • T Series
 
 

Related Documentation

  • M Series
  • Junos OS Authentication Order for RADIUS, TACACS+, and Password Authentication
  • MX Series
  • Junos OS Authentication Order for RADIUS, TACACS+, and Password Authentication
  • T Series
  • Junos OS Authentication Order for RADIUS, TACACS+, and Password Authentication
 
Recent Community Posts
Show All Show Fewer 
 
 
Related Links
M Series Product Literature
  • Junos Central
  • Junos Technotes
  • Junos Day One Books
M Series Certification
  • Fast Track Certification Program
  • Certification Study Guides
Junos Technical Education Courses (Free)
  • Networking Fundamentals
  • Junos As A Second Language
  • Junos As A Scripting Language
  • Junos As A Security Language
  • Juniper Networks Books
Support
  • Junos Software (Canada & US)  Login required
  • Junos Software (Worldwide) Login required
  • Knowledge Base - Browse M Series Articles  Login required
  • Technical Bulletins for M Series Login required
  • IOS to Junos Migration Tool Login required
  • ScreenOS to Junos software with enhanced services Migration Tool Login required
Show All Show Fewer 
 
 

Using Regular Expressions on a RADIUS or TACACS+ Server to Allow or Deny Access to Commands

Use regular expressions to specify which operational or configuration mode commands are allowed or denied when using a RADIUS or TACACS+ server for user authentication. You can specify the regular expressions using the appropriate Juniper Networks vendor-specific RADIUS or TACACS+ attributes in your authentication server configuration.

You can specify allow-configuration, deny-configuration, allow-commands, or deny-commands in a single extended regular expression, enclosing multiple commands in parentheses and separating them using the pipe symbol. For example, you can specify multiple allow-commands parameters using: allow-commands= (cmd1 | cmd2 | cmdn). You can specify user-permissions as a list of comma separated values, and not as a regular expression.

On a RADIUS or TACACS+ server, you can also use a simplified version for regular expressions where you specify each individual expression on a separate line. The simplified version is valid for allow-commands, deny-commands, allow-configuration, deny-configuration, and permissions vendor-specific attributes:

For a RADIUS server, specify the individual regular expressions using the following syntax:

Juniper-Allow-Commands+="cmd1"Juniper-Allow-Commands+="cmd2"Juniper-Allow-Commands+="cmdn"Juniper-Deny-Commands+="cmd1"Juniper-Deny-Commands+="cmd2"Juniper-Deny-Commands+="cmdn"Juniper-Allow-Configuration+="regex1"Juniper-Allow-Configuration+="regex2"Juniper-Allow-Configuration+="regexn"Juniper-Deny-Configuration+="regex1"Juniper-Deny-Configuration+="regex2"Juniper-Deny-Configuration+="regexn"Juniper-User-Permissions+="permission-flag1"Juniper-User-Permissions+="permission-flag2"Juniper-User-Permissions+="permission-flagn"

For a TACACS+ server, specify the individual regular expressions using the following syntax:

allow-commands1="cmd1"allow-commands2="cmd2"allow-commandsn="cmdn"deny-commands1="cmd1"deny-commands2="cmd2"deny-commandsn="cmdn"allow-configuration1="regex1"allow-configuration2="regex2"allow-configurationn="regexn"deny-configuration1="regex1"deny-configuration2="regex2"deny-configurationn="regexn"user-permissions1="permission-flag1"user-permissions2="permission-flag2"user-permissionsn="permission-flagn "
  • Numeric values 1 to n in the syntax (for a TACACS+ server) must be unique but need not be sequential. For example, the following syntax is valid:
    allow-commands1="cmd1"allow-commands3="cmd3"allow-commands2="cmd2"deny-commands3="cmd3"deny-commands2="cmd2"deny-commands1="cmd1"
  • The limit on the number of lines of individual regular expressions is imposed by the TACACS+ or RADIUS server.
  • When you issue the show cli authorization command, the command output displays the regular expression in a single line, even if you specify each individual expression on a separate line.

For more information about Juniper Networks vendor-specific RADIUS and TACACS+ attributes, see Juniper Networks Vendor-Specific RADIUS Attributes and Juniper Networks Vendor-Specific TACACS+ Attributes.

Note: When RADIUS or TACACS+ authentication is configured for a router, regular expressions configured on the RADIUS or TACACS+ server merge with any regular expressions configured on the local router at the [edit system login class] hierarchy level using the allow-commands, deny-commands, allow-configuration, deny-configuration, or permissions statements. If the final expression has a syntax error, the overall result is an invalid regular expression.

 

Related Documentation

  • M Series
  • Junos OS Authentication Order for RADIUS, TACACS+, and Password Authentication
  • MX Series
  • Junos OS Authentication Order for RADIUS, TACACS+, and Password Authentication
  • T Series
  • Junos OS Authentication Order for RADIUS, TACACS+, and Password Authentication
 

Published: 2010-10-08

 
  • About Juniper
  • Investor Relations
  • Press Releases
  • Newsletters
  • Juniper Offices
  • Green Networking
  • Resources
  • How to Buy
  • Partner Locator
  • Image Library
  • Visio Templates
  • Security Center
  • Community
  • Forums
  • Blogs
  • Junos Central
  • Social Media
  • Developers
  • Support
  • Technical Documentation
  • Knowledge Base (KB)
  • Software Downloads
  • Product Licensing
  • Contact Support
Site Map / RSS Feeds / Careers / Accessibility / Feedback / Privacy & Policy / Legal Notices
Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.
Help
|
My Account
|
Log Out