Il 01/04/2010 14:50, Dario Calamai ha scritto:
2010/4/1 Normando Marcolongo<[email protected]>:
Ciao!
Ho un problema strano di NAT con un PIX ASA5510. Qualche dettaglio:
- classiche 2 interfacce
- una direttiva 'global (outside)' con un IP X non dell'interfaccia esterna
ma, ovviamente, "dentro" la subnet in cui sta l'outside
- una direttiva 'nat (inside)' per fare uscire tutta la subnet inside.
- diverse direttive static (inside,out-fw) IP.PUBBLICOY IP.PRIVATO per il
traffico entrante
- le regole nella forma delle "nuove" access-list che permettono il traffico
entrante (e' una ACL applicata in 'in' all'interfaccia outside)
- # sh ver
Cisco Adaptive Security Appliance Software Version 7.0(8)
Device Manager Version 5.0(8)
Problema:
- tutto funziona alla meraviglia: gli host della rete interna navigano
tranquillamente con l'IP X pubblico e i server nattati dalle static escono
con i rispettivi IP assegnati (es. IP.PUBBLICOY)
- ogni tanto NON funziona piu' un NAT e il traffico entrante non entra piu'.
Il tutto si risolve generando traffico verso internet dall'IP privato
destinatario del NAT non funzionante
Cose fatte a naso (praticamente non ho studiato mai niente dei PIX :-) ) e
non capite:
- ma il proxy-arp degli IP.PUBBLICI oggetto di una static e' automagico?
- non e' necessario aggiungere direttive static per il nat al contrario?
Cioe' tipo static (out-fw, inside) IP.PRIVATO IP.PUBBLICOY?
- perche' ha funzionato bene per anni?
Per ulteriori dettagli sono qui, ovviamente ;-)
Grazie!
Normando
_______________________________________________
http://www.areanetworking.it
http://www.areanetworking.it/blog
[email protected]
http://ml.areanetworking.it/mailman/listinfo/cug
ciao!
la butto li escludendo un problema di conf dell'ASA visto che รจ sempre
andato tutto per anni! :D
potresti avere "sopra" degli ip duplicati?
R-----SW-------ASA------HOSTs
|
HOST con stesso ip
con sopra intendo tra l'ASA e il Router che fa livello3; per esempio
attaccato allo switch dello schema.
Chiarissimo ma il PIX e' direttamente collegato al router...
test: quando "non funziona il NAT" riesci lo stesso a pingare l'IP
pubblico. Guarda sul Router la tabella di ARP se il mac address
cambia.
Anche quando non funziona il PIX risponde proxando l'ARP dell'IP nelle
direttive "static".
Aggiungo uno straccetto di configurazione come giustamente fatto notare:
fw-bastardo# sh ru
: Saved
:
ASA Version 7.0(8)
!
hostname fw-bastardo
domain-name default.domain.invalid
no names
dns-guard
!
interface Ethernet0/0
nameif out-fw
security-level 0
ip address x.x.x.z 255.255.255.240
!
interface Ethernet0/1
nameif inside
security-level 100
ip address 192.168.50.254 255.255.255.0
!
interface Ethernet0/2
shutdown
no nameif
no security-level
no ip address
!
interface Management0/0
nameif management
security-level 100
ip address 192.168.1.1 255.255.255.0
management-only
!
ftp mode passive
object-group network WWW
network-object host x.x.x.83
network-object host x.x.x.88
network-object host x.x.x.89
network-object host x.x.x.86
network-object host x.x.x.85
object-group network FTP
network-object host x.x.x.83
network-object host x.x.x.85
object-group network SSH
network-object host x.x.x.86
network-object host x.x.x.83
network-object host x.x.x.85
object-group service RADIUS udp
port-object range radius radius-acct
object-group network RADIUS_SRV
network-object host x.x.x.83
object-group network MYSQL
network-object host x.x.x.83
object-group network DNS
network-object host x.x.x.83
object-group network SMTP
network-object host x.x.x.83
network-object host x.x.x.86
object-group network POP3
network-object host x.x.x.86
object-group network RDP
network-object host x.x.x.89
network-object host x.x.x.87
object-group network TEL1
network-object host x.x.x.90
network-object host x.x.x.91
object-group network WWWS
network-object host x.x.x.92
access-list ACL_OUTSIDE extended permit tcp any object-group WWW eq www
access-list ACL_OUTSIDE extended permit tcp any object-group FTP eq ftp
access-list ACL_OUTSIDE extended permit tcp any object-group FTP eq ftp-data
access-list ACL_OUTSIDE extended permit udp any object-group RADIUS_SRV
object-group RADIUS
access-list ACL_OUTSIDE extended permit udp any object-group DNS eq domain
access-list ACL_OUTSIDE extended permit tcp any object-group SMTP eq smtp
access-list ACL_OUTSIDE extended permit tcp any object-group POP3 eq pop3
access-list ACL_OUTSIDE extended permit tcp any object-group WWWS eq https
access-list ACL_OUTSIDE extended permit icmp any any
access-list ACL_OUTSIDE extended permit tcp host 87.23.173.91 host
x.x.x.87 eq 3389 log
pager lines 24
logging enable
logging buffer-size 1048576
logging buffered informational
logging asdm informational
mtu out-fw 1500
mtu inside 1500
mtu management 1500
asdm image disk0:/asdm-508.bin
no asdm history enable
arp timeout 14400
global (out-fw) 1 x.x.x.84 netmask 255.255.255.255
nat (inside) 1 192.168.50.0 255.255.255.0
static (inside,out-fw) x.x.x.86 192.168.50.250 netmask 255.255.255.255
static (inside,out-fw) x.x.x.88 192.168.50.237 netmask 255.255.255.255
static (inside,out-fw) x.x.x.89 192.168.50.253 netmask 255.255.255.255
static (inside,out-fw) x.x.x.90 192.168.50.201 netmask 255.255.255.255
static (inside,out-fw) x.x.x.85 192.168.50.213 netmask 255.255.255.255
static (inside,out-fw) x.x.x.92 192.168.50.117 netmask 255.255.255.255
static (inside,out-fw) x.x.x.91 192.168.50.204 netmask 255.255.255.255
static (inside,out-fw) x.x.x.87 192.168.50.224 netmask 255.255.255.255
static (inside,out-fw) x.x.x.83 192.168.50.200 netmask 255.255.255.255
access-group ACL_OUTSIDE in interface out-fw
route out-fw 0.0.0.0 0.0.0.0 x.x.x.81 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00
timeout mgcp-pat 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec transform-set set esp-3des esp-md5-hmac
crypto ipsec security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
isakmp enable out-fw
isakmp policy 1 authentication pre-share
isakmp policy 1 encryption 3des
isakmp policy 1 hash sha
isakmp policy 1 group 2
isakmp policy 1 lifetime 43200
telnet timeout 5
ssh 192.168.50.0 255.255.255.0 inside
ssh timeout 5
console timeout 0
dhcpd address 192.168.1.2-192.168.1.254 management
dhcpd lease 3600
dhcpd ping_timeout 50
dhcpd enable management
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map global_policy
class inspection_default
inspect dns maximum-length 512
inspect ftp
inspect h323 h225
inspect h323 ras
inspect rsh
inspect rtsp
inspect esmtp
inspect sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
!
service-policy global_policy global
ntp server 193.204.114.233 source out-fw
Cryptochecksum:edbc96b6927b91ff6766b06efe240491
: end
Aggiungo un dettaglio allarmante (per me): un tizio dell'ISP a cui e'
collegato il PIX in questione dava per noto questo tipo di
comportamento, dicendo che non ricordava come si risolvesse non avendoci
a che fare spesso ma piu' di una volta e' capitato.
Normando
_______________________________________________
http://www.areanetworking.it
http://www.areanetworking.it/blog
[email protected]
http://ml.areanetworking.it/mailman/listinfo/cug