25.10.2014 Views

Sybex - CCNA 2.0 Study Guide (640-507).pdf - Cifo

Sybex - CCNA 2.0 Study Guide (640-507).pdf - Cifo

Sybex - CCNA 2.0 Study Guide (640-507).pdf - Cifo

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Access Lists 447<br />

On the Acme router, the following standard IP access list is applied:<br />

Acme#config t<br />

Acme(config)#access-list 10 deny 172.16.40.0 0.0.0.255<br />

Acme(config)#access-list 10 permit any<br />

It is very important to understand that the any command is the same thing<br />

as saying this:<br />

Acme(config)#access-list 10 permit 0.0.0.0 255.255.255.255<br />

At this point, the access list is denying the Sales LAN and allowing everyone<br />

else. But where should this access list be placed? If you place it as an incoming<br />

access list on E2, you might as well shut down the Ethernet interface because<br />

all of the Sales LAN devices are denied access to all networks attached to the<br />

router. The best place to put this router is the E0 interface as an outbound list.<br />

Acme(config)#int e0<br />

Acme(config-if)#ip access-group 10 out<br />

This completely stops network 172.16.40.0 from getting out Ethernet 0,<br />

but it can still access the Marketing LAN and the Internet.<br />

Controlling VTY (Telnet) Access<br />

You will have a difficult time trying to stop users from telnetting into a<br />

router because any active port on a router is fair game for VTY access. However,<br />

you can use a standard IP access list to control access by placing the<br />

access list on the VTY lines themselves.<br />

To perform this function:<br />

1. Create a standard IP access list that permits only the host or hosts you<br />

want to be able to telnet into the routers.<br />

2. Apply the access list to the VTY line with the access-class command.<br />

Here is an example of allowing only host 172.16.10.3 to telnet into a router:<br />

RouterA(config)#access-list 50 permit 172.16.10.3<br />

RouterA(config)#line vty 0 4<br />

RouterA(config-line)#access-class 50 in<br />

Because of the implied deny any at the end of the list, the access list stops<br />

any host from telnetting into the router except the host 172.16.10.3.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!