04-13-2018 12:19 PM - edited 02-21-2020 07:37 AM
ASA 5555, IOS 9.2 using ASDM 7.2
I have tried everything I can think of and cannot get incoming traffic to get through my rules.
I stripped it all down to one rule and still no luck. I know its something basic but I just don't get it.
When I run a packet trace on the NAT rule it works fine, when I try it on the access rule it fails
Please advise..
interface GigabitEthernet0/0
nameif outside
security-level 0
ip address xxx.xxx.xxx.1 255.255.252.0
!
interface GigabitEthernet0/1
nameif inside
security-level 100
ip address 10.0.0.1 255.255.0.0
!
interface GigabitEthernet0/2
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet0/3
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet0/4
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet0/5
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet0/6
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet0/7
shutdown
no nameif
no security-level
no ip address
!
interface Management0/0
management-only
no nameif
no security-level
no ip address
!
ftp mode passive
dns server-group DefaultDNS
domain-name xxx.xxx.xxx
object network obj_any
subnet 0.0.0.0 0.0.0.0
object network Email_Filter
host 10.7.0.4
object service SMTP
service tcp destination eq smtp
access-list outside_access_in extended permit tcp any object Email_Filter eq smtp
access-list inside_access_in extended permit ip any any
pager lines 24
logging asdm informational
mtu outside 1500
mtu inside 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
nat (inside,outside) source static Email_Filter interface service any SMTP
!
object network obj_any
nat (any,outside) dynamic interface
access-group outside_access_in in interface outside
access-group inside_access_in in interface inside
route outside 0.0.0.0 0.0.0.0 xxx.xxx.xxx.2 1
route inside 10.7.0.0 255.255.255.255 10.0.0.4 1
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
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 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
http server enable
http 10.0.0.1 255.255.255.255 inside
http 10.0.0.10 255.255.255.255 inside
no snmp-server location
no snmp-server contact
crypto ipsec security-association pmtu-aging infinite
crypto ca trustpool policy
telnet timeout 5
no ssh stricthostkeycheck
ssh timeout 5
ssh key-exchange group dh-group1-sha1
console timeout 0
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
message-length maximum client auto
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
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
inspect ip-options
!
service-policy global_policy global
Thanks!
04-13-2018 05:48 PM
hi,
what kind of NAT isn't working? is is static or dynamic/PAT?
could you post a show nat output?
if you're referring to static NAT on your Email_Filter try:
object network Email_Filter
host 10.7.0.4
nat (inside,outside) static interface service tcp 25 25
04-16-2018 07:21 AM
I only setup one NAT, its the one for SMTP
sho nat
Manual NAT Policies (Section 1)
1 (inside) to (outside) source static Email_Filter interface service any SMTP
translate_hits = 0, untranslate_hits = 0
Auto NAT Policies (Section 2)
1 (any) to (outside) source dynamic obj_any interface
translate_hits = 14092, untranslate_hits = 0
04-13-2018 08:53 PM
do you see the hitcount on the outside interface ACL increase at all?
04-16-2018 07:27 AM
FYI I am only using packet trace to check the config. I need to have it setup before I can test on the production network. If I use port 25 as the source port I do see the hit counter increase.
04-14-2018 09:05 AM
I would rework your NAT rules to how @johnlloyd_13 mentioned in his reply. Your NAT statement has a few things wrong:
nat (inside,outside) source static Email_Filter interface service any SMTP
object service SMTP
service tcp destination eq smtp
The NAT above translates the Email_Filter server's ip address to the interface. Also, any destination port is changed to tcp 25 during this translation.
Since I assume that you are using the bidirectional nature of this rule to allow inbound smtp to your server, your rules should ideally look like:
nat (inside,outside) source static Email_Filter interface service SMTP SMTP
object service SMTP
service tcp source eq smtp
04-16-2018 01:28 PM - edited 04-16-2018 01:29 PM
Here is what I ended up with and it worked as long as the source port is 25, well in packet trace anyway, I need to try it in the production environment.
object service SMTP
service tcp source eq smtp
object network Email_Filter
host 10.7.0.4
description Barracuda
access-list outside_access_in extended permit object SMTP any object Email_Filter
nat (inside,outside) source static Email_Filter interface service SMTP SMTP
Now I just have about 300 more NAT entries to create
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide