发新话题
打印

关于cisco2600的配置。

关于cisco2600的配置。

请看以下配置,目前这样配置,那些静态的地址转换的ip,端口都是全开的。我该如何应用访问控制列表,让外部ip只能访问这些静态转换地址的指定端口。谢谢!


!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
enable secret 5 $1$ykgH$h0hEYOFx.25eOZzuLGIJb.
enable password xxxxxxx
!
ip subnet-zero
!
!
!
interface Ethernet0/0
ip address 192.168.1.9 255.255.255.0
no ip directed-broadcast
ip nat inside
no cdp enable
!
interface Serial0/0
no ip address
no ip directed-broadcast
shutdown
no cdp enable
!
interface Ethernet0/1
ip address x.x.x.x 255.255.255.224
no ip directed-broadcast
ip nat outside
no cdp enable
!
ip nat pool test x.x.x.x netmask 255.255.255.224
ip nat inside source list 11 pool test overload
ip nat inside source static 192.168.1.11 x.x.x.x
ip nat inside source static 192.168.1.250 x.x.x.x
ip nat inside source static 192.168.1.242 x.x.x.x
ip nat inside source static 192.168.1.252 x.x.x.x
ip nat inside source static 192.168.1.247 x.x.x.x
ip nat inside source static 192.168.1.225 x.x.x.x
ip classless
ip route 0.0.0.0 0.0.0.0 x.x.x.x
!
access-list 11 permit any
access-list 110 permit tcp any host 192.168.1.242 eq www
access-list 110 permit tcp any host 192.168.1.242 eq 993
access-list 110 permit tcp any host 192.168.1.242 eq 443
access-list 110 permit tcp any host 192.168.1.242 eq pop3
access-list 110 permit tcp any host 192.168.1.242 eq smtp
access-list 110 permit tcp any host 192.168.1.225 eq www
access-list 110 permit tcp any host 192.168.1.247 eq www
access-list 110 permit tcp any host 192.168.1.252 eq www
access-list 110 permit tcp any host 192.168.1.250 eq 14662
access-list 110 permit udp any host 192.168.1.250 eq 14672
dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx permit
no cdp run
snmp-server community public RO
!
line con 0
exec-timeout 0 0
transport input none
line aux 0
line vty 0 4
password xxxxx
login
!
end

TOP

将你的110规则应用到接口上就可以了!

TOP

请写具体命令。谢谢啦。

TOP

请问,具体命令是什么。我试了在外部和外部端口上 ip access-list group 110 out,但是不能上网了,是不是在外部端口上应该写成in?谢谢!

TOP

请问具体命令是什么,应用在哪个端口,谢谢?

TOP

按照你110的配置,用in
放在e0/0上,内网可以访问110的这些地址端口
放在e0/1上,外网可以访问110的这些地址端口(要做地址和端口的映射)

TOP

我需要让内部的都能访问,外部的只能访问那些做静态nat的地址的指定的端口。如何做?请写具体命令,谢谢啦!

TOP

发新话题