18.12.2012 Views

O'Reilly - Practical UNIX & Internet Sec... 7015KB

O'Reilly - Practical UNIX & Internet Sec... 7015KB

O'Reilly - Practical UNIX & Internet Sec... 7015KB

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

[Chapter 21] 21.3 Example: Cisco Systems Routers as Chokes<br />

Be aware that the show access-lists command is normally not a privileged command; anybody who can log into your<br />

router can see all of your access lists. You can make it privileged by using the IOS privilege commands added in IOS<br />

Version 10.3.<br />

21.3.3 access-class Command: Protecting Virtual Terminals<br />

After you have created one or more access lists, you can use the access-class command to assign the access-control list to<br />

a particular Cisco virtual-terminal line. You assign access lists to a particular Cisco interface by using the access-class<br />

command. You should use the access-class command to configure your router so that it will reject login attempts from<br />

any host outside your organization. You may also wish to configure your router so that it rejects all login attempts from<br />

inside your organization as well, with the exception of a specially designed administrative machine.<br />

The access-class command has the following syntax:<br />

access-class access-list-number {in|out}<br />

Where:<br />

access-list-number<br />

Specifies the number of an access list. This must be a number between 1 and 199.<br />

in | out<br />

Specifies whether incoming connections or outgoing connections should be blocked.<br />

You can use this command to prevent people from logging directly onto your router (using one of the vty interfaces)<br />

unless they are coming from a specially designated network. For example, to configure your router so that it will only<br />

accept logins from the subclass C network 198.3.3, you could use the following sequence of IOS commands:<br />

router#config t<br />

Enter configuration commands, one per line. End with CNTL/Z.<br />

router(config)#access-list 12 permit 198.3.3.0 0.0.0.255<br />

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

router(config-line)#access-class 12 in<br />

router(config-line)#^Z<br />

router#<br />

21.3.4 ip access-group Command: Protecting IP Interfaces<br />

You can also use access lists to specify packets that should be blocked from crossing an IP interface. For example, if you<br />

are using the Cisco interface to create a conventional choke-and-gate interface, and you have a serial connection to an<br />

<strong>Internet</strong> service provider, you can specify that the only IP packets that should be transmitted in from the interface should<br />

be those that are destined for the gate machine, and that the only IP packets that should be transmitted out from the serial<br />

interface are those that are from your gate.<br />

The command that associates an access list with a particular interface is the access-group command. This is an<br />

interface-configuration command, which means that it is typed when the router is in interface-configuration mode.<br />

The access-group command has the following syntax:<br />

ip access-group access-list-number {in | out}<br />

Where:<br />

access-list-number<br />

Specifies the number of an access list. This must be a number between 1 and 199.<br />

in | out<br />

file:///C|/Oreilly Unix etc/<strong>O'Reilly</strong> Reference Library/networking/puis/ch21_03.htm (4 of 5) [2002-04-12 10:45:57]

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

Saved successfully!

Ooh no, something went wrong!