09-11-2020 01:47 AM
Hello all,
I have problem with telnet connection:
the config on the router (on this router want to built a telnet connection):
username usr password 0 pass
line vty 0 4
login local
autocommand access-enable host timeout 5
transport input all
access-list 100 permit tcp 10.0.0.0 0.0.0.255 host 10.0.0.1 eq telnet
access-list 100 dynamic Testlist timeout 5 permit ip 10.0.0.0 0.0.0.255 172.16.0.0 0.0.0.255
interface GigabitEthernet0/0
description Link to Client
ip address 10.0.0.1 255.255.255.0
ip access-group 100 in
duplex auto
speed auto
media-type rj45
error message on the client:
Client#telnet 10.0.0.1
Trying 10.0.0.1 ... Open
User Access Verification
Username: usr
Password:
[Connection to 10.0.0.1 closed by foreign host]
as you see in the output, it prompts me for username and password, I can type these, but then immediately closed by foreign host, and I do not why! The neighbor interface on the client router has the IP 10.0.0.2, so from the net 10.0.0.0 /24, this is allowed in the dynamic acl. I am using cisco virl 2.0
Can you help me in this case?
Many thanks for your help in advance
Mihaly
09-11-2020 02:42 AM
Looks intresting, the commands are simple it should work as expected.
i can only think of as of now - since we do not have complete config of the device - post the full show run
Quick test you can do :
1. Do you have AAA configured ? on the global config ?
if not add below and test :
config t
!
aaa new-model
!
end
09-11-2020 12:14 PM
09-11-2020 02:29 PM
Hello,
you are missing the command:
username usr autocommand access-enable host
Once you TELNET to 10.0.0.1 (from a host in the 10.0.0.0/24 network) the authentication is performed on the router. After you enter the username and password, the connection closes. You should see the additional permit entry marked in bold. You can now access the 172.16.0.0/24 network.
Router#sh access-lists
Extended IP access list 100
10 permit tcp 10.0.0.0 0.0.0.255 host 10.0.0.1 eq telnet (24 matches)
20 Dynamic MYLIST permit ip 10.0.0.0 0.0.0.255 172.16.0.0 0.0.0.255
permit ip host 10.0.0.2 172.16.0.0 0.0.0.255
09-14-2020 07:13 AM
Hello Georg,
I have tired it, does not work, but thank you for your help!
Mihaly
09-15-2020 12:28 AM
Hello,
what are you trying to accomplish ?
You will always be disconnected, that is what the dynamic access list does. But after you are disconnected, a dynamic entry is added to your access list, which allows access from the network you specified.
Once you are disconnected, check for an extra line in the output of 'show access-lists'...
09-16-2020 01:20 PM
Hello,
yes I can ping the IP 172.16.0.2 from the 10.0.0.0 net, but the telnet does not work.
however this line in the ACL allows it: access-list 100 permit tcp 10.0.0.0 0.0.0.255 host 10.0.0.1 eq telnet
I do not understand, why I am always be disconnected.
09-11-2020 03:25 PM - edited 09-11-2020 03:55 PM
Hello
Can you confirm that what you are trying to accomplish here, Is host 10.1.1.1 is the rtr to authenticate users from 10.0.0.0/24 by a telnet session to host 10.1.1.1 then after that those 10.0.0.0/16 users are then able to communicate to users in 172.16.0.0/24 network?
If so then the termination you experience is expected as host 10.1.1.1 has authenticated the telnet session as such you should then be able to reach 172.16.0.0/16 users, However what i would suggest is to append an ace entry in the acl so to allow the return traffic from 17.16.0.0/16 network :
access-list 100 permit tcp 10.0.0.0 0.0.0.255 host 10.0.0.1 eq telnet
access-list 100 permit tcp any any established
access-list 100 dynamic Testlist timeout 5 permit ip 10.0.0.0 0.0.0.255 172.16.0.0 0.0.0.255
09-11-2020 04:00 PM - edited 09-11-2020 04:05 PM
Hello
Just realised that you are asking to allow local access to rtr 10.1.1.1 when using a DACL
If so then you need to append yet again the extended access-list to allow this to happen and use a different local access credential (not really necessary but i personally would do so.
username local privilege 15 secret fred
access-list 100 permit tcp 10.0.0.0 0.0.0.255 host 10.0.0.1 eq telnet
permit tcp any host 10.1.23.2 eq 3050
access-list 100 permit tcp any any established
access-list 100 dynamic Testlist timeout 5 permit ip 10.0.0.0 0.0.0.255 172.16.0.0 0.0.0.255
line vty 5
rotary 50
login local
Then from a host
telnet 10.1.1.1 3050
09-14-2020 07:17 AM
Hi Paul,
I installed the extra lines, but does not work.
why the IP 10.1.23.2? The IP from the Router is the 10.0.0.1
error message on client:
Client#telnet 10.0.0.1 3050
Trying 10.0.0.1, 3050 ...
% Destination unreachable; gateway or host down
or:
Username:
[Connection to 10.0.0.1 closed by foreign host]
Many thanks
Mihaly
09-14-2020 02:50 PM
Hello
That was a typo on my part, it should read 10.0.0.1 the ip of the rtr.
access-list 100 permit tcp 10.0.0.0 0.0.0.255 host 10.0.0.1 eq telnet
permit tcp any host 10.0.0.1 eq 3050
access-list 100 permit tcp any any established
access-list 100 dynamic Testlist timeout 5 permit ip 10.0.0.0 0.0.0.255 172.16.0.0 0.0.0.255
Ammend the acl to look like the above and also add the rotary on the vty line line and test again
09-16-2020 01:28 PM
Hello,
thanks again, I will try it later, currently my virl does not work properly.
kind regards
Mihaly
09-18-2020 03:00 AM
Hello Paul,
I could try now, I followed your instruction, it still does not work:
Username: usr
Password:
[Connection to 10.0.0.1 closed by foreign host]
after your config, the ping doesnt work either:
Client#ping 172.16.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.0.2, timeout is 2 seconds:
UUUUU
kind regards
Mihaly
09-18-2020 02:21 PM
Hello
Can you post the following:
show access-lists
sh run | in vty
09-29-2020 11:01 AM
Hello,
sorry for the late answer:
current on the router:
access-list 100 permit tcp 10.0.0.0 0.0.0.255 host 10.0.0.1 eq telnet
access-list 100 permit tcp any host 10.0.0.1 eq 3050
access-list 100 permit tcp any any established
access-list 100 dynamic Testlist timeout 5 permit ip 10.0.0.0 0.0.0.255 172.16.0.0 0.0.0.255
line vty 5
rotary 50
login local
transport input telnet
so telnet works (Client#telnet 10.0.0.1 3050)
but ping in direction 172.16.0.2 does not work
Router#sh access-lists
Extended IP access list 100
10 permit tcp 10.0.0.0 0.0.0.255 host 10.0.0.1 eq telnet (72 matches)
20 Dynamic MYLIST permit ip 10.0.0.0 0.0.0.255 172.16.0.0 0.0.0.255
30 permit tcp any host 10.0.0.1 eq 3050 (151 matches)
40 permit tcp any any established
without line vty 5 does not work the telnet connection
if it is deleted:
access-list 100 permit tcp any host 10.0.0.1 eq 3050
ping an 172.16.0.2 works, but telnet not
best regards
Mihaly
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide