ASA Tunnel not hitting the correct NAT

Started by that1guy15, September 23, 2015, 10:02:09 AM

Previous topic - Next topic

that1guy15

crypto map outside_map 37 match address outside_37_cryptomap
crypto map outside_map 37 set peer <Peer IP>
crypto map outside_map 37 set transform-set ESP-3DES-SHA
crypto map outside_map 37 set security-association lifetime seconds 28800
crypto map outside_map 37 set security-association lifetime kilobytes 4608000
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
crypto map outside_map interface outside

tunnel-group <Peer IP> type ipsec-l2l
tunnel-group <Peer IP> ipsec-attributes
pre-shared-key *

access-list outside_37_cryptomap extended permit ip object-group INTERNAL-SERVERS object-group REMOTE-SERVERS
access-list outside_37_cryptomap extended permit ip object-group INTERNAL-SERVERS-1 object-group REMOTE-SERVERS


NAT config is listed above. IPS and names are changed to protect the guilty.
That1guy15
@that1guy_15
blog.movingonesandzeros.net

routerdork

Looking at your config above, which is pretty much identical to how we do our tunnels, the only difference is how we do our NAT. What is your NAT trying to accomplish? Is just using one NAT statement to allow access for each tunnel? Also what code are you running?

nat (INSIDE,OUTSIDE) source static insert_source_object_group insert_source_object_group destination static insert_destination_object_group insert_destination_object_group route-lookup

So the equivalent to yours would be...
nat (inside,outside) source static INTERNAL-SERVERS INTERNAL-SERVERS destination static REMOTE-SERVERS REMOTE-SERVERS route-lookup
nat (inside,outside) source static INTERNAL-SERVERS-1 INTERNAL-SERVERS-1 destination static REMOTE-SERVERS REMOTE-SERVERS route-lookup
"The thing about quotes on the internet is that you cannot confirm their validity." -Abraham Lincoln

that1guy15

Code is old. 8.0...

We have a reserved range for NATed traffic for Vendor tunnels. So its just basically there so we dont overlap with their space. These servers just do a 1-to-1 for all vendors.
That1guy15
@that1guy_15
blog.movingonesandzeros.net

deanwebb

Quote from: that1guy15 on September 23, 2015, 05:46:08 PM
Code is old. 8.0...

We have a reserved range for NATed traffic for Vendor tunnels. So its just basically there so we dont overlap with their space. These servers just do a 1-to-1 for all vendors.

Please upgrade so as to avoid major security fail. Thank you.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

wintermute000

My ASA-fu is weak now but I am curious about this and can't see anything obvious so please keep us in the loop!
I'd just TAC it TBH - throw the show run and packet tracer at them.

that1guy15

Yeah pretty much said the same thing when I took over these firewalls. I got denied multiple times because they dont see just reason for a possible outage. The cut to 8.3 looks like a nightmare for these guys as they have not been administered well....
I now have been approved to replace them Q1 next year so they would rather wait till then to take an outage and are fine with them as-is...

Gotta love it!!
That1guy15
@that1guy_15
blog.movingonesandzeros.net

that1guy15

Quote from: wintermute000 on September 23, 2015, 08:20:55 PM
My ASA-fu is weak now but I am curious about this and can't see anything obvious so please keep us in the loop!
I'd just TAC it TBH - throw the show run and packet tracer at them.

Yup. TAC call will be first thing in the morning. Figured Id give you guys first crack.

Thanks for the help so far!!
That1guy15
@that1guy_15
blog.movingonesandzeros.net

deanwebb

Quote from: that1guy15 on September 23, 2015, 08:27:09 PM
Quote from: wintermute000 on September 23, 2015, 08:20:55 PM
My ASA-fu is weak now but I am curious about this and can't see anything obvious so please keep us in the loop!
I'd just TAC it TBH - throw the show run and packet tracer at them.

Yup. TAC call will be first thing in the morning. Figured Id give you guys first crack.

Thanks for the help so far!!
If TAC says to upgrade the code...

:haha1:
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

that1guy15

ah yeah dude. I HATE calling TAC on these guys. Its their easy out on everything and they dig in and call it a day.

"What the PSU is on fire? Yeah you are running old code. Upgrade to 9.x and then we can help disable the fire."
That1guy15
@that1guy_15
blog.movingonesandzeros.net

wintermute000

#24
Back to basics


Checking what you are trying to accomplish. What's the exact parameter to obtain the packet tracer output?


From my reading of it:


Traffic FROM inside interface TO outside interface
FROM GROUPA TO xxx.xxx.xxx.142
NAT source IP i.e. GROUPA to 10.19.176.25


and then your crypto map ACL 37 is supposed to match interesting traffic which is (due to order of operations) 10.19.176.25 to xxx.xxx.xxx.142?


And this works for the first 2 lines of access-list inside_nat_static_20, just not the new one?



static (inside,outside) 10.19.176.25  access-list inside_nat_static_20 


access-list inside_nat_static_20 extended permit ip host GROUPA host xxx.xxx.xxx.119
access-list inside_nat_static_20 extended permit ip host GROUPA host xxx.xxx.xxx.110
access-list inside_nat_static_20 extended permit ip host GROUPA host xxx.xxx.xxx.142 <---this line is what I added

EOS

I'd be curious to see a packet-tracer from the one that works, then compare it to the one that doesn't.

that1guy15

@wintermute000

That is correct. To clarify the NAT statement is called by the original tunnel for the original two entries and is still functioning. The new tunnel calls the same NAT statement but only for the new entry.
That1guy15
@that1guy_15
blog.movingonesandzeros.net

routerdork

So the reason I asked about code...back in the 8.1/8.2 days I ran into a bug where a change on a tunnel caused it to no longer put traffic across the tunnel until the ASA was reloaded  :barf:
"The thing about quotes on the internet is that you cannot confirm their validity." -Abraham Lincoln

deanwebb

Quote from: routerdork on September 24, 2015, 08:49:31 AM
So the reason I asked about code...back in the 8.1/8.2 days I ran into a bug where a change on a tunnel caused it to no longer put traffic across the tunnel until the ASA was reloaded  :barf:

Might want to give that a try, even though they're outage-averse.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

that1guy15

TAC picked it up pretty quick. Its mostly me being stupid with how ASAs do tunnels.

Two things:

1) NAT Exemption was not in place for the new traffic flow so the default NAT was being used. I was under the impression the default NAT was checked last after everything. But I guess it goes first. OK...

2) It was mentioned earlier in the thread. Interesting traffic being matched via ACL overlapped with the original tunnel so it would not stand up the new tunnel. I assumed since it matched different ACEs of the ACL it would differentiate between the two. I assumed wrong.

So working with the other end I have two options to move forward. Update the original tunnel with a secondary tunnel destination and have them kill the old tunnel on their end, or remove the old tunnel completely on my side and stand up the new tunnel.

It looks like that1guy needs to spend some time and get alot more familiar with the ASA line.   :doh: :wall:
That1guy15
@that1guy_15
blog.movingonesandzeros.net