interface fastethernet 0/0
description WAN Interface
ip address 172.16.1.1 255.255.255.0
ip nat outside
interface fastethernet 0/1
description LAN Interface
ip address 10.10.10.1 255.255.255.0
ip nat inside
ip access-list extended NAT-LIST
permit ip any any
ip nat inside source list NAT-THIS interface fastethernet 0/0 overload
The partial configuration above will be sufficient to allow Internet access from PCs connected to the router's LAN. It will also allow for network administrators to SSH or Telnet to routers from the LAN. However, one will NOT be able to SSH/telnet to the router from the outside, over the Internet.
ip access-list extended NAT-LIST
permit ip any any
The
permit any any line above translates
all requests from the LAN as well as from the Internet to FastEthernet 0/0 IP Address, which in turn will break SSH/Telnet access to the router.
ip access-list extended NAT-LIST
permit ip 10.10.10.0 0.0.0.255 any
Of course, you will need to create crypto key if you use SSH and you will have to configure VTY to allow SSH/Telnet sessions.
username user privilege 15 password user123
interface fastethernet 0/0
description WAN Interface
ip address 172.16.1.1 255.255.255.0
ip nat outside
interface fastethernet 0/1
description LAN Interface
ip address 10.10.10.1 255.255.255.0
ip nat inside
ip access-list extended NAT-LIST
permit ip 10.10.10.0 0.0.0.255 any
ip nat inside source list NAT-THIS interface fastethernet 0/0 overload
line vty 0 4
login local
transport input telnet
OR (for the final line)...
transport input ssh
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (5)
Commented:
Commented:
that is not fully correct. The part with RSA keys is correct but not the part with aaa-new model. SSH will work also without aaa-new model but only 1.9 version when you will to run the 2.0 version then you need to configure aaa-new model.
Marek
Author
Commented:If your NAT ACL is from any source to any destination, router will not allow SSH/telnet access.
Commented:
The reply above was only a reaction to the comment from rsaettel.
Author
Commented: