HP 6125G HP 6125G & 6125G/XG Blade Switches Fundamentals Command Refer - Page 20

activation-key, Examples, Syntax, Default level

Page 20 highlights

If you configure two or more ACLs of the same type for a VTY user interface, only the last one takes effect. A basic ACL with the inbound keyword and a basic ACL with the outbound keyword are considered different types of ACLs. The same is true for advanced ACLs. If you apply more than one type of ACL to a VTY user interface, the match order is basic ACL, advanced ACL, and Ethernet frame header ACL. Examples # Allow only the user with the IP address of 192.168.1.26 to access the device through Telnet or SSH. system-view [Sysname] acl number 2001 [Sysname-acl-basic-2001] rule permit source 192.168.1.26 0 [Sysname-acl-basic-2001] quit [Sysname] user-interface vty 0 [Sysname-ui-vty0] acl 2001 inbound After your configuration, user A (with the IP address 192.168.1.26) can Telnet to the device while user B (with the IP address 192.168.1.60) cannot Telnet to the device. Upon a connection failure, a message appears, saying "%connection closed by remote host!" # Allow the device to only Telnet to the Telnet server with IP address 192.168.1.41. system-view [Sysname] acl number 3001 [Sysname-acl-adv-3001] rule permit tcp destination 192.168.1.41 0 [Sysname-acl-adv-3001] quit [Sysname] user-interface vty 0 7 [Sysname-ui-vty0-7] acl 3001 outbound [Sysname-ui-vty0-7] return After your configuration, if you Telnet to 192.168.1.46, your operation fails. telnet 192.168.1.46 %Can't access the host from this terminal! But you can Telnet to 192.168.1.41. telnet 192.168.1.41 Trying 192.168.1.41 ... Press CTRL+K to abort Connected to 192.168.1.41 ... activation-key Syntax activation-key character View undo activation-key AUX user interface view Default level 3: Manage level 13

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180

13
If you configure two or more ACLs of the same type for a VTY user interface, only the last one takes effect.
A basic ACL with the
inbound
keyword and a basic ACL with the
outbound
keyword are considered
different types of ACLs. The same is true for advanced ACLs.
If you apply more than one type of ACL to a VTY user interface, the match order is basic ACL, advanced
ACL, and Ethernet frame header ACL.
Examples
# Allow only the user with the IP address of 192.168.1.26 to access the device through Telnet or SSH.
<Sysname> system-view
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule permit source 192.168.1.26 0
[Sysname-acl-basic-2001] quit
[Sysname] user-interface vty 0
[Sysname-ui-vty0] acl 2001 inbound
After your configuration, user A (with the IP address 192.168.1.26) can Telnet to the device while user B
(with the IP address 192.168.1.60) cannot Telnet to the device. Upon a connection failure, a message
appears, saying "%connection closed by remote host!"
# Allow the device to only Telnet to the Telnet server with IP address 192.168.1.41.
<Sysname> system-view
[Sysname] acl number 3001
[Sysname-acl-adv-3001] rule permit tcp destination 192.168.1.41 0
[Sysname-acl-adv-3001] quit
[Sysname] user-interface vty 0 7
[Sysname-ui-vty0-7] acl 3001 outbound
[Sysname-ui-vty0-7] return
<Sysname>
After your configuration, if you Telnet to 192.168.1.46, your operation fails.
<Sysname> telnet 192.168.1.46
%Can't access the host from this terminal!
But you can Telnet to 192.168.1.41.
<Sysname> telnet 192.168.1.41
Trying 192.168.1.41 ...
Press CTRL+K to abort
Connected to 192.168.1.41 ...
activation-key
Syntax
activation-key
character
undo activation-key
View
AUX user interface view
Default level
3: Manage level