cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
923
Views
0
Helpful
4
Replies

Howto deny access to router from public networks

MatthiasGTW
Level 1
Level 1

Hello experts!

I have a Cisco router set up to allow telnet and ssh login via these lines:

line vty 0 4
privilege level 15
login local
transport input telnet ssh

Is there an easy way to deny this access from any public or outside network?

I want to be able to login only from our internal LANs (192.168.0.x and 192.168.1.x).

Thanks in advance for your help!

Kind regards, Matthias

2 Accepted Solutions

Accepted Solutions

Jennifer Halim
Cisco Employee
Cisco Employee

Sure, just create ACL to allow the private subnets as follows:

access-list 5 permit 192.168.0.0 0.0.0.255

access-list 5 permit 192.168.1.0 0.0.0.255

line vty 0 4

access-class 5 in

Hope that helps.

View solution in original post

Yes sure.

The command is:

ip http access-class 5

View solution in original post

4 Replies 4

Jennifer Halim
Cisco Employee
Cisco Employee

Sure, just create ACL to allow the private subnets as follows:

access-list 5 permit 192.168.0.0 0.0.0.255

access-list 5 permit 192.168.1.0 0.0.0.255

line vty 0 4

access-class 5 in

Hope that helps.

Hello halijenn,

that worked very well, thanks. Is it also possible to apply this access-list to the internal web-server of the router?

It is set up as:


ip http server
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000

But these commands are outside of any "line" or "interface" -- how can I apply an access-list anyway?

Thanks again!

Yes sure.

The command is:

ip http access-class 5

great, thanks a lot!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: