有个有一个嗯的疑问音效,IP ACCESS-LIST是不是要和ip access-group配套用

查看:2072|回复:18
初级工程师
附件名称: 超NB的Pix防火墙配置
压缩包内文件格式: 可执行文件
附件来源: 互联网
运行平台: Windows平台
是否经本人验证: 是
附件性质: 免费
详细说明: Configure Logging, SNMP and NTP,DHCP,the PIX to block Java and ActiveX applets, RIP with MD5 Authentication, OSPF with MD5 Authentication,Multicast Support,AAA,VPN,Creating a IPSec Tunnel with a Certificate Authority (CA),IDS,FailoverSample Text
免费分享IT技术资料,就在51CTO下载中心:
高级工程师
好东西,支持
高级工程师
好东西,支持
我的积分为什么这么低
助理工程师
又快没钱了.....
高级工程师
中级工程师
白袍大法师
看看有多NB
天下风云出我辈, 一入江湖岁月催。当年的“小侠唐在飞” 如今变成了“大侠唐在飞”。?金杯银杯,不如网友的口碑;金奖银奖,不如网友的褒奖;熊掌鸭掌,不如网友的鼓掌~& &
?欢迎加入“唐志强技术教学交流群”,群号:。& &?
中级工程师
good,support
ding qi lai
提示: 作者被禁止或删除 内容自动屏蔽
好东西,支持
高级工程师
谢谢LZ 学习学习……
QQ: MSN:biwei_ E-mail:biwei_
中级工程师
中级工程师【图文】IP访问控制列表_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
IP访问控制列表
大小:900.50KB
登录百度文库,专享文档复制特权,财富值每天免费拿!
你可能喜欢Access Lists
Access lists regulate network traffic flow and security by using permit and deny statements that filter traffic based on source address, destination address, and protocol type of a packet.& They are available for IP, IPX, AppleTalk, and other protocols.
Access lists must be entered in sequentially, you can't move individual statements once they are entered.& You can disable the access list with the no access-list [list #] command.& It is common to create the access list separately and apply it by copying and pasting it into the router configuration.
To copy an externally created access list, for example from a TFTP server, create the list on the TFTP host and save the file as plain text (ASCII).& Then, from your router, use the copy tftp running-config file_id command to copy the access list to your router.& Finally, perform the copy running-config startup-config command to save the access list to your router's NVRAM.& The first command of an edited access list file should delete the previous access list (for example, type a no access-list command at the beginning of the file) else the new rules will be appended to the end of the access list.
If you telnet into a router and apply an access list, there is the possibility that you could be blocked from the router.& To avoid the inconvenience of being locked out, use the command reload in [hh:mm].& This command will cause the router to restart and load a startup-config without the access list that blocked access.
Access List Rules
Access lists must be applied sequentially and they always end with an implicit deny statement.& Since all traffic not explicitly permitted in the access list is blocked, using the command access-list [list #] permit any at the end of the access list allows remaining traffic that hasn't been blocked with a deny statement through the interface.& This is why you can't append new rules to an access list, any statements added after the permit any or implicit deny command wouldn't be evaluated, a packet is only evaluated by an access list until it matches a statement.& You should place first on the list the lines that are most likely to find a match, this will reduce unnecessary processing and save CPU time.& To remove an access-list use the command no access-list [list #].& This command removes the entire access list.& If you don't remove an access list first, all new lines will be appended to the end of the old one.& After you create access lists, you must apply them to an interface so they can filter traffic.& They can be either outgoing or incoming filters.
Access List Type
Standard IP Access Lists
Extended IP Access Lists
Standard IPX Access Lists
Extended IPX Access Lists
IPX SAP Filters
Applying an Access List
Router(config-if)#ip access-group ?
IP access list (standard or extended)
IP expanded access list (standard or extended)
Access-list name
The following command filters incoming traffic with standard IP access-list 1
Router(config-if)#ip access-group 1 in
The following command filters outgoing traffic with standard IP access-list 1
Router(config-if)#ip access-group 1 out
If the filter direction (in or out) isn't specified, it uses outbound by default.&An interface can't have more than one inbound or more than one outbound access list applied to it.& Multiple lists are allowed if the lists are for different protocols.
Access Lists Follow These Rules
Routers apply lists sequentially in the order in which you type them into the router.
Routers apply lists to packets sequentially, from the top down, one line at a time.
Packets are processed only until a match is made and then they are acted upon based on the access list criteria contained in access list statements.
Lists always end with an implicit deny. Routers discard any packets that do not match any of the access list statements.
Access lists must be applied to an interface as either inbound or outbound traffic filters.
Only one list, per protocol, per direction can be applied to an interface.
Two Main Types of Access Lists
1.&Standard
Standard IP Access Lists
Standard IP access lists filter network traffic based on the source IP address.& Using a standard access list, you can filter traffic by a host IP address, subnet, or a network address.& In order to configure standard IP access lists, you you must first create the access list and then apply it to an interface using the following syntax:
access-list [list #] [permit|deny] [source address] [source wildcard mask]
Definition
Standard IP access lists are represented by a number ranging from 1-99 or text names with IOS 11.2 or greater
[permit|deny]
Used to specify the nature of the access list either a permit or deny statement
[source address]
The IP address of the source
[source wildcard mask]
A wildcard mask, or inverse mask, applied to determine which bits of the source address are significant
Wildcard masks are the inverse of the subnet, the 0's are significant and the 1's are not significant.& If you compare the source address to the wildcard mask, the source address bits that match up with the 0's specifies the network (only one) and the source address bits that match the 1's are all the hosts to which the list applies.
Wildcard Examples
Host Range
192.168.1.55
192.168.1.55
192.168.1.0
192.168.1.1 - 192.168.1.255
Last octet (one network)
192.168.0.0
0.0.255.255
192.168.0.1 - 192.168.255.255
Last two octets (entire 192.168.0.0 network)
142.110.16.0
142.110.16.1 - 142.110.23.255
Last octet and right 3 bits of second from right octet (part of the network)
172.16.32.0
0.0.31.255
172.16.32.1 - 172.16.63.255
Last octet and right 5 bits of second from right octet (part of the network)
Example for Standard IP Access Lists
Router(config)#access-list 1 deny host 192.168.1.4
Router(config)#access-list 1 permit 0.0.0.0 255.255.255.255
Router(config)#int e0
Router(config-if)#ip access-group 1 out
This access list allows traffic from 192.168.1.4 to enter the router, but the access list denies it from exiting on interface Ethernet 0.& The deny statement uses the default wildcard mask of 0.0.0.0 (i.e. all bits are significant and it only applies to one host).& The 0.0.0.0 255.255.255.255 can be replaced with the word any.& The list is applied to the outbound of one interface as opposed to the inbound.& This will prevent the host being blocked from other networks on the router that might not have been intended since traffic from 192.168.1.4 can enter the router and be switched to other networks on interfaces other than ethernet 0.& You should apply the standard IP access list as close to the destination network as possible, or you could inadvertently block access to portions of your network.& Use the command show access-lists to see the access lists on your router.& For just IP access lists use the command show ip access-list.
To remove the access list use the command no access-list [list #].& Use the show ip interface and the show interface commands to verify that an access list has been successfully applied to an interface.
Standard IPX Access Lists
Standard IPX Access Lists are similar to standard IP access lists, except they can filter based on source and destination addresses or networks.&&
access-list [list #] [permit|deny] [source network/ node address]
[destination network/ destination address]
Definition
Standard IPX access lists are represented by a number ranging from 800-899
[permit|deny]
Used to specify the nature of the access list either a permit or deny statement
[source network/ node address]
The IPX address of the source network or node
[destination network/ destination address]
The IPX address of the destination network or node
The following access list denies IPX network 500 from accessing IPX network 200 on inbound ethernet 0 and then permits all others.& This access list should be applied as close to network 500 as possible to reduce network traffic.
Router(config)#access-list 800 deny 500 200
Router(config)#access-list 800 permit -1 -1
Router(config)#int e0
Router(config-if)#ipx access-group 800 in
The -1 is like the IP's any command, it applies to all hosts.& Standard IPX access lists can be seen with the command show access-lists or show ipx accest-list.
2.&Extended
Extended IP Access Lists
Extended IP access lists can filter based on source IP address, destination IP address, protocol type, and application destination and source port numbers, whereas standard IP access lists only filter sources addresses.& You also configure extended IP access lists by creating the list and applying it to an interface using the following syntax:
access-list [list #] [permit|deny] [protocol] [source IP addr] [source wildcard mask] [operator]
[port] [destination IP addr] [destination wildcard mask] [operator] [port] [log]
Definition
Extended IP access lists are represented by a number ranging from 100-199 or text names with IOS 11.2 or greater
[permit|deny]
Used to specify the nature of the access list either a permit or deny statement
[protocol]
The IP protocol to be filtered can be IP (includes all protocols in the TCP/IP suite) TCP,UDP,ICMP,or others
[source address]
The IP address of the source
[source wildcard mask]
A wildcard mask, or inverse mask, applied to determine which bits of source address are significant
[operator]
Can contain lt (less than), gt (greater than), eq (equal to), or neq (not equal to). It is used if an extended list filters by a specific port number
If necessary, the source port number or name of the protocol to be filtered.
[destination address]
The IP address of the destination
[destination wildcard mask]
A wildcard mask, or inverse mask, applied to determine which bits of destination address are significant
[operator]
Can contain lt (less than), gt (greater than), eq (equal to), or neq (not equal to). It is used if an extended list filters by a specific port number
If necessary, the destination port number or name of the protocol to be filtered
Turns on logging of access list activity
Example: This access list will block 192.168.1.10 from accessing TCP port www (http[80]) on host 192.168.2.2.& The host keyword is a shortcut for the 0.0.0.0 wildcard mask.& Since extended IP access lists use destination addresses, the list should be applied as close to the source as possible to reduce unnecessary traffic on the network.
Router(config)#access-list 100 deny tcp host 192.168.1.10 host 192.168.2.2 eq www
Router(config)#access-list 100 permit ip any any
Router(config)#int e0
Router(config-if)#ip access-group 100 in
To remove the access list use the command no ip access-group [list #].& Use the same commands to monitor an extended IP access list as a standard access list i.e. show access-lists or show ip access-list.& Extended IP access lists show the number of matches per lin to clear these counters, use the command clear access-list counter [list #].
Extended IPX Access Lists
Extended IPX access lists allow you to filter based on source and destination network or node address, IPX protocol type, and IPX socket #.
access-list [list #] [permit|deny] [protocol] [source network/ node address] [socket]
[destination network/ node address] [socket]
Definition
Extended IP access lists are represented by a number ranging from 900-999.
[permit|deny]
Used to specify the nature of the access list, either a permit or deny statement.
[protocol]
IPX protocol, a -1 specifies all IPX protocols.
[source network/ node address]
The IPX address of the source network or node.
Similar to the port value in IP access lists, points to a particular service, a 0 specifies all sockets.
[destination network/ node address]
The IPX address of the destination network or node.
Similar to the port value in IP access lists, points to a particular service, a 0 specifies all sockets.
Example: The -1s are for any ipx protocol or network. This access list denies all protocols (-1) and all sockets (0) from IPX network 500 from going to IP network 200 (all sockets also).& The access list should be applied to the inbound interface that IPX network 500 is on.& This will reduce network traffic and save router resources.
Router(config)#access-list 900 deny -1 500 0 200 0
Router(config)#access-list 900 permit -1 -1 0 -1 0
Router(config)#int e0
Router(config-if)#ipx access-group 900 in
Again you can see the IPX extended access list with the command show access-lists or show ipx acces-list.
IPX SAP Filters
IPX SAP filters limit SAP traffic in order to control what resources on the IPX network will be visible to IPX clients.& This allows you to limit the advertisement of particular servers and services to a particular IPX network segment.& Since SAP advertisements are broadcasts, limiting them can reduce network traffic.& Can be used to block server advertisements between separate departments.
access-list [list #] [permit|deny] [source network / node address] [service-type]
Definition
IPX SAP filters are represented by a number in the range of .
[permit|deny]
Used to specify the nature of the access list either a permit or deny statement.
[source network/ node address]
The IPX address of the source network or node.
[service-type]
IPX services such as print services, file services, or directory services, a 0 matches all services.
Example: Denies all SAP advertisements from network 200, but allows updates to all other network segments.
Router(config)#access-list 1001 deny 200 0
Router(config)#access-list 1001 permit -1 0
To apply a SAP filter to an inbound interface, use the commands:
Router(config)#int e0
Router(config-if)#ipx input-sap-filter 1001
OR to apply the access list to an outbound interface, use the commands:
Router(config)#int e0
Router(config-if)#ipx output-sap-filter 1001
This would block all advertisements from network 200 from being passed to other routers on the internetwork.& Again you can use the command show access-lists to see the access lists.
Controlling VTY Access
You can control access to VTY ports by applying a standard access list to the VTY lines.
Router_2#conf t
Enter configuration commands, one per line.
End with CNTL/Z.
Router_2(config)#access-list 15 permit host 192.168.1.71
Router_2(config)#line vty 0 4
Router_2(config-line)#access-class 15 in
This will stop all hosts except 192.168.1.71 from telneting into the router.& This is accomplished by only allowing one host and then not permitting any other hosts since there is an implicit deny at the end of all access lists.查看:3798|回复:7
中级工程师
我记得在路由器里定义好ACC规则后,然后应用到接口上。
但是如果我在三层交换机上定义好ACC LIST,然后进入端口好像没有ACCESS-GROUP这个命令。
如下图,三层上共分了3个VLAN,我想让其中车间VLAN30这个不能访问外网,其它的两个VLAN能访问外网,如何实现?
是要在三层上做限制叱,还是在路由器上?
(39.56 KB)
中级工程师
我在三层上 access-list 100 deny ip 192.168.10.0 0.0.0.255 any 这个不起作用。
高级工程师
建立访问规则,静止VLAN30访问连接路由器的VLAN,允许访问所有,将该规则应用在连接路由器的VLAN上
高级工程师
或者在连接路由器的VLAN上直接拒绝来自VLAN30的数据
高级工程师
假设连接路由器的VLAN 是VLAN 1000,
ip access-list 100
10 deny 192.168.10.0 0.0.0.255
20 permit any
interface vlan1000
ip access-group 100 in
中级工程师
根据上面的提示,我试了还是不行。现在把PT软件传上来,你们看看。
(50.79 KB)
(50.79 KB)
下载次数: 41
中级工程师
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
hostname Switch
enable password 7 A16
ip dhcp excluded-address 192.168.0.2
ip dhcp excluded-address 172.16.10.1
ip dhcp pool vlan20
network 172.16.10.0 255.255.255.0
default-router 172.16.10.1
dns-server 8.8.8.8
ip dhcp pool vlan10
network 192.168.0.0 255.255.255.0
default-router 192.168.0.2
dns-server 172.16.10.3
ip dhcp pool vlan30
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
ip dhcp pool 10
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 172.16.10.4
ip routing
172.16.10.2
spanning-tree mode pvst
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
interface FastEthernet0/3
switchport access vlan 10
switchport mode access
interface FastEthernet0/4
switchport access vlan 10
switchport mode access
interface FastEthernet0/5
switchport access vlan 10
switchport mode access
interface FastEthernet0/6
switchport access vlan 10
switchport mode access
interface FastEthernet0/7
switchport access vlan 10
switchport mode access
interface FastEthernet0/8
switchport access vlan 10
switchport mode access
interface FastEthernet0/9
switchport access vlan 10
switchport mode access
interface FastEthernet0/10
switchport access vlan 10
switchport mode access
interface FastEthernet0/11
switchport access vlan 20
switchport mode access
interface FastEthernet0/12
switchport access vlan 20
switchport mode access
interface FastEthernet0/13
switchport access vlan 20
switchport mode access
interface FastEthernet0/14
switchport access vlan 20
switchport mode access
interface FastEthernet0/15
switchport access vlan 20
switchport mode access
interface FastEthernet0/16
switchport access vlan 20
switchport mode access
interface FastEthernet0/17
switchport access vlan 20
switchport mode access
interface FastEthernet0/18
switchport access vlan 20
switchport mode access
interface FastEthernet0/19
switchport access vlan 20
switchport mode access
interface FastEthernet0/20
switchport access vlan 30
switchport mode access
interface FastEthernet0/21
switchport access vlan 30
switchport mode access
interface FastEthernet0/22
switchport access vlan 30
switchport mode access
interface FastEthernet0/23
switchport access vlan 30
switchport mode access
interface FastEthernet0/24
switchport access vlan 20
switchport mode access
interface GigabitEthernet0/1
interface GigabitEthernet0/2
interface Vlan1
ip address 192.168.0.2 255.255.255.0
ip access-group 100 in
interface Vlan10
ip address 192.168.1.1 255.255.255.0
interface Vlan20
ip address 172.16.10.1 255.255.255.0
interface Vlan30
ip address 192.168.10.1 255.255.255.0
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.0.1
access-list 10 deny 192.168.10.0 0.0.0.255
access-list 10 permit any
access-list 100 deny ip 192.168.10.0 0.0.0.255 host 100.100.100.20
access-list 100 permit ip any any
access-list 100 deny ip 192.168.10.0 0.0.0.255 192.168.0.0 0.0.0.255
line con 0
line vty 0 4
password 7 08701E1D
标准acl一般应用在目标IP的接口上,扩展ACL一般应用在源地址IP的接口上。楼主的策略应该在路由器上做,如果楼主只是单纯的限制VLAN 30的访问外网,可以通过修改NAT的ACL匹配原则来达到目的
access-list 99 permit 192.168.1.0 0.0.0.255
access-list 99 permit 172.16.10.0 0.0.0.255
假设楼主路由器F0/1接内网交换机,F0/0接外网
ip nat inside
ip nat outside
ip nat inside source list 99 interface&&f0/0 overload
本帖最后由 一路you阳光 于
10:27 编辑access-list(访问控制列表的配置)_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
access-list(访问控制列表的配置)
阅读已结束,下载文档到电脑
想免费下载更多文档?
定制HR最喜欢的简历
你可能喜欢

我要回帖

更多关于 英语疑问词有哪些 的文章

 

随机推荐