Problema NAT su VPN
Inviato: mar 24 set , 2013 7:43 am
Buongiorno a tutti. Seguendo questa guida http://www.ciscoforums.it/viewtopic.php?f=16&t=9960 pensavo di essere riuscito a risolvere il mio problema:
- ho una vpn site-to-site e una porta con un nat statico. La porta con nat statico funziona utilizzando l'ip pubblico, ma non se si tenta l'accesso tramite la vpn.
- usando i consigli del post indicato sopra la connessione funziona perfettamente sia i vpn che sull'ip pubblico, ma gli utenti della lan non riescono a navigare.
Ecco la configurazione risultante dopo le indicazioni del post sopra. Grazie a chiunque mi possa aiutare.
version 12.4
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service sequence-numbers
!
hostname yourname
!
boot-start-marker
boot-end-marker
!
logging buffered 51200 informational
logging console critical
enable secret 5 xxxxxxxxxxxxxxxxxx
!
aaa new-model
!
!
aaa authentication login default local
aaa authorization exec default local
!
!
aaa session-id common
!
crypto pki trustpoint TP-self-signed-3856562441
enrollment selfsigned
ip-address domain name yourdomain.com
subject-name cn=IOS-Self-Signed-Certificate-3856562441
revocation-check none
rsakeypair TP-self-signed-3856562441
!
!
!
!
ip cef
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
username admin privilege 15 secret 5 xxxxxxxxxxxxxxxxxxxx
!
!
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
crypto isakmp key yyyyyyy address xx.yy.zz.ww
!
!
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
!
crypto map SDM_CMAP_1 1 ipsec-isakmp
description Tunnel toxx.yy.zz.ww
set peer xx.yy.zz.ww
set transform-set ESP-3DES-SHA
match address 101
!
archive
log config
hidekeys
!
!
ip tcp synwait-time 10
ip ssh time-out 60
ip ssh authentication-retries 2
!
!
!
interface Null0
no ip unreachables
!
interface ATM0
no ip address
no ip redirects
no ip unreachables
no ip proxy-arp
ip route-cache flow
no atm ilmi-keepalive
dsl operating-mode auto
!
interface ATM0.3 point-to-point
description $ES_WAN$$FW_OUTSIDE$
ip address xx.yy.zz.ww2 255.255.255.248
ip access-group 110 in
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat outside
ip virtual-reassembly
pvc 8/35
encapsulation aal5snap
!
crypto map SDM_CMAP_1
!
interface FastEthernet0
!
interface FastEthernet1
!
interface FastEthernet2
!
interface FastEthernet3
!
interface Vlan1
description $ETH-SW-LAUNCH$$INTF-INFO-HWIC 4ESW$$ES_LAN$$FW_INSIDE$
ip address 192.168.11.99 255.255.255.0
ip access-group 111 in
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat inside
ip virtual-reassembly
ip route-cache flow
ip tcp adjust-mss 1452
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 ATM0.3
!
ip http server
ip http access-class 23
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
ip nat pool IpPubblici xx.yy.zz.ww2 xx.yy.zz.ww2 netmask 255.255.255.248
ip nat inside source static tcp 192.168.11.1 22 interface ATM0.3 10022
ip nat inside source route-map SDM_RMAP_1 interface ATM0.3 overload
ip nat inside source static tcp 192.168.11.1 5632 xx.yy.zz.ww2 5632 route-map POL-NAT extendable
!
access-list 1 permit 192.168.11.0 0.0.0.255
access-list 1 remark SDM_ACL Category=16
access-list 23 permit any
access-list 23 remark SDM_ACL Category=17
access-list 100 remark SDM_ACL Category=2
access-list 100 remark IPSec Rule
access-list 100 deny ip 192.168.11.0 0.0.0.255 192.168.0.0 0.0.0.255
access-list 100 permit ip 192.168.11.0 0.0.0.255 any
access-list 101 remark SDM_ACL Category=4
access-list 101 remark IPSec Rule
access-list 101 permit ip 192.168.11.0 0.0.0.255 192.168.0.0 0.0.0.255
access-list 102 remark SDM_ACL Category=128
access-list 102 permit ip host 255.255.255.255 any
access-list 102 permit ip 127.0.0.0 0.255.255.255 any
access-list 102 permit ip 88.54.154.56 0.0.0.7 any
access-list 103 remark SDM_ACL Category=128
access-list 103 permit ip any any
access-list 107 remark ACL per Policy NAT VPN
access-list 107 deny ip 192.168.11.0 0.0.0.255 192.168.0.0 0.0.0.255
access-list 107 permit ip any any
access-list 110 remark SDM_ACL Category=17
access-list 110 permit ip any any
access-list 111 deny udp host 192.168.11.221 eq 46881 any
access-list 111 permit ip any any
no cdp run
route-map POL-NAT permit 10
match ip address 107
!
route-map SDM_RMAP_1 permit 1
match ip address 100
!
!
control-plane
!
banner login ^CCAuthorized access only!
Disconnect IMMEDIATELY if you are not an authorized user!^C
!
line con 0
no modem enable
transport output telnet
line aux 0
transport output telnet
line vty 0 4
access-class 23 in
privilege level 15
transport input telnet ssh
!
scheduler max-task-time 5000
scheduler allocate 4000 1000
scheduler interval 500
sntp server 192.43.244.18
end
- ho una vpn site-to-site e una porta con un nat statico. La porta con nat statico funziona utilizzando l'ip pubblico, ma non se si tenta l'accesso tramite la vpn.
- usando i consigli del post indicato sopra la connessione funziona perfettamente sia i vpn che sull'ip pubblico, ma gli utenti della lan non riescono a navigare.
Ecco la configurazione risultante dopo le indicazioni del post sopra. Grazie a chiunque mi possa aiutare.
version 12.4
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service sequence-numbers
!
hostname yourname
!
boot-start-marker
boot-end-marker
!
logging buffered 51200 informational
logging console critical
enable secret 5 xxxxxxxxxxxxxxxxxx
!
aaa new-model
!
!
aaa authentication login default local
aaa authorization exec default local
!
!
aaa session-id common
!
crypto pki trustpoint TP-self-signed-3856562441
enrollment selfsigned
ip-address domain name yourdomain.com
subject-name cn=IOS-Self-Signed-Certificate-3856562441
revocation-check none
rsakeypair TP-self-signed-3856562441
!
!
!
!
ip cef
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
username admin privilege 15 secret 5 xxxxxxxxxxxxxxxxxxxx
!
!
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
crypto isakmp key yyyyyyy address xx.yy.zz.ww
!
!
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
!
crypto map SDM_CMAP_1 1 ipsec-isakmp
description Tunnel toxx.yy.zz.ww
set peer xx.yy.zz.ww
set transform-set ESP-3DES-SHA
match address 101
!
archive
log config
hidekeys
!
!
ip tcp synwait-time 10
ip ssh time-out 60
ip ssh authentication-retries 2
!
!
!
interface Null0
no ip unreachables
!
interface ATM0
no ip address
no ip redirects
no ip unreachables
no ip proxy-arp
ip route-cache flow
no atm ilmi-keepalive
dsl operating-mode auto
!
interface ATM0.3 point-to-point
description $ES_WAN$$FW_OUTSIDE$
ip address xx.yy.zz.ww2 255.255.255.248
ip access-group 110 in
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat outside
ip virtual-reassembly
pvc 8/35
encapsulation aal5snap
!
crypto map SDM_CMAP_1
!
interface FastEthernet0
!
interface FastEthernet1
!
interface FastEthernet2
!
interface FastEthernet3
!
interface Vlan1
description $ETH-SW-LAUNCH$$INTF-INFO-HWIC 4ESW$$ES_LAN$$FW_INSIDE$
ip address 192.168.11.99 255.255.255.0
ip access-group 111 in
no ip redirects
no ip unreachables
no ip proxy-arp
ip nat inside
ip virtual-reassembly
ip route-cache flow
ip tcp adjust-mss 1452
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 ATM0.3
!
ip http server
ip http access-class 23
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
ip nat pool IpPubblici xx.yy.zz.ww2 xx.yy.zz.ww2 netmask 255.255.255.248
ip nat inside source static tcp 192.168.11.1 22 interface ATM0.3 10022
ip nat inside source route-map SDM_RMAP_1 interface ATM0.3 overload
ip nat inside source static tcp 192.168.11.1 5632 xx.yy.zz.ww2 5632 route-map POL-NAT extendable
!
access-list 1 permit 192.168.11.0 0.0.0.255
access-list 1 remark SDM_ACL Category=16
access-list 23 permit any
access-list 23 remark SDM_ACL Category=17
access-list 100 remark SDM_ACL Category=2
access-list 100 remark IPSec Rule
access-list 100 deny ip 192.168.11.0 0.0.0.255 192.168.0.0 0.0.0.255
access-list 100 permit ip 192.168.11.0 0.0.0.255 any
access-list 101 remark SDM_ACL Category=4
access-list 101 remark IPSec Rule
access-list 101 permit ip 192.168.11.0 0.0.0.255 192.168.0.0 0.0.0.255
access-list 102 remark SDM_ACL Category=128
access-list 102 permit ip host 255.255.255.255 any
access-list 102 permit ip 127.0.0.0 0.255.255.255 any
access-list 102 permit ip 88.54.154.56 0.0.0.7 any
access-list 103 remark SDM_ACL Category=128
access-list 103 permit ip any any
access-list 107 remark ACL per Policy NAT VPN
access-list 107 deny ip 192.168.11.0 0.0.0.255 192.168.0.0 0.0.0.255
access-list 107 permit ip any any
access-list 110 remark SDM_ACL Category=17
access-list 110 permit ip any any
access-list 111 deny udp host 192.168.11.221 eq 46881 any
access-list 111 permit ip any any
no cdp run
route-map POL-NAT permit 10
match ip address 107
!
route-map SDM_RMAP_1 permit 1
match ip address 100
!
!
control-plane
!
banner login ^CCAuthorized access only!
Disconnect IMMEDIATELY if you are not an authorized user!^C
!
line con 0
no modem enable
transport output telnet
line aux 0
transport output telnet
line vty 0 4
access-class 23 in
privilege level 15
transport input telnet ssh
!
scheduler max-task-time 5000
scheduler allocate 4000 1000
scheduler interval 500
sntp server 192.43.244.18
end