# Cisco ASA Hairpin Internal Server

**URL:** <https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819>\
**Category:** Lessons Discussion\
**Created:** [December 19, 2016, 4:31pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819 "2016-12-19T16:31:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [December 19, 2016, 4:31pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/1 "2016-12-19T16:31:21Z")

</div>

This topic is to discuss the following lesson:

> **[Cisco ASA Hairpin Internal Server](https://networklessons.com/cisco/asa-firewall/cisco-asa-hairpin-internal-server)**
>
> This lesson explains how to configure ASA hairpinning so internal hosts can reach an internal server using its public IP address.

---

<div class="post-metadata">

**Author:** ![pbyrne](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/p/919ad9/32.png) [@pbyrne](https://forum.networklessons.com/u/pbyrne)\
**Post date:** [January 11, 2016, 9:48pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/2 "2016-01-11T21:48:08Z")

</div>

Excellent article Rene, have Cisco included the no-proxy-arp as implied on nat statements in the 9.x code ?

this seemed to cause problems on 8.3 code with the Asa Arping for the internal web/mail server

Thanks

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [January 13, 2016, 4:05pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/3 "2016-01-13T16:05:10Z")

</div>

Hi Paul,

Proxy arp can be a pain sometimes but I think the default since 8.4 is to have it enabled on the ASA. It is enabled on my ASA 9.5:

```auto
ASA1# sh run all sysopt | i proxy
no sysopt noproxyarp OUTSIDE
no sysopt noproxyarp INSIDE

```

```auto
ASA1(config)# show version | incl Version
Cisco Adaptive Security Appliance Software Version 9.5(1)201 
Device Manager Version 7.5(1)

```

Rene

---

<div class="post-metadata">

**Author:** ![Zaman.rubd](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/z/45deac/32.png) [@Zaman.rubd](https://forum.networklessons.com/u/Zaman.rubd)\
**Post date:** [March 10, 2016, 12:04pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/4 "2016-03-10T12:04:58Z")

</div>

Hi Rene,

Why need for access to web server using the public ip(192.168.2.200) whereas We can access the server locally (Directly).Which special scenario we will use like this ?  
Could you please explain further ?

br//  
zaman

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [March 10, 2016, 2:56pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/5 "2016-03-10T14:56:40Z")

</div>

Hi Zaman,

If possible, I wouldn’t implement hairpinning like this (inside to inside NAT). It is easier to use a DNS server for hosts on the inside that resolves hostname of the webserver to the local IP address and another DNS server on the outside that resolves to the public IP address.

Some reasons I can think of why you still want something like this:

- You don't want to manage two DNS servers. This allows you to use one IP address to reach the webserver...doesn't matter if you are on the inside or outside of the network.
- You have laptops that are used on the inside and outside and have issues with DNS caching.

Rene

---

<div class="post-metadata">

**Author:** ![chhayhengc](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/c/9fc348/32.png) [@chhayhengc](https://forum.networklessons.com/u/chhayhengc)\
**Post date:** [April 28, 2016, 1:09pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/6 "2016-04-28T13:09:40Z")

</div>

Hi Rene,

The same your diagram, but I replace SWL2 to SWL3. Is it possible ?

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [May 2, 2016, 2:34pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/7 "2016-05-02T14:34:07Z")

</div>

Hi Chheang,

That might be difficult. In this example, the ASA is the default gateway for both devices. If you have a L3 switch in the middle and the host/webserver in different subnets then the switch will do routing. This will cause issues.

Rene

---

<div class="post-metadata">

**Author:** ![palanimuthukar](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/p/8c91f0/32.png) [@palanimuthukar](https://forum.networklessons.com/u/palanimuthukar)\
**Post date:** [May 21, 2016, 3:00am UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/8 "2016-05-21T03:00:11Z")

</div>

Hi Rene

Is this the twice NAT?

Thanks  
Palani

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [May 21, 2016, 1:57pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/9 "2016-05-21T13:57:53Z")

</div>

Twice NAT means you configure a source and destination in a single rule so yes, that’s pretty much what we do here. We specify the source (host) and the destination (webserver).

---

<div class="post-metadata">

**Author:** ![senan.alkaaby](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@senan.alkaaby](https://forum.networklessons.com/u/senan.alkaaby)\
**Post date:** [August 13, 2016, 2:15am UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/10 "2016-08-13T02:15:04Z")

</div>

Hi Rene,

Thank you for your Article , its very good and simple to understand. I need your help to know how to configure the same thing But if ASA has a version 8.2 , i means the version with it Before 8.4 that you have do it in your example. Per my understanding its totally different and more complicated.

Would you mind please give me a summary about that with a simple example.

Thank you

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [August 29, 2016, 4:40pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/11 "2016-08-29T16:40:14Z")

</div>

Hi Sinan,

Glad to hear you like it. I probably won’t do this example for 8.2 as it might take some time and 8.2 is pretty old by now.

Rene

---

<div class="post-metadata">

**Author:** ![Fabian\_Martinez1](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/f/8797f3/32.png) [@Fabian\_Martinez1](https://forum.networklessons.com/u/Fabian_Martinez1)\
**Post date:** [January 17, 2017, 2:26am UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/12 "2017-01-17T02:26:24Z")

</div>

Hi Rene,

I have the following NAT Rule and I’ve broken it down the way you did in your example:

nat (Outside,Outside) source static MITH-PROD\_1 NAT\_MIRTH\_PROD\_1 destination static RWJBH\_Rawway\_NAT RWJBH\_NewBrunswick

- (Outside,Outside): we are translating traffic from the outside that is going to the outside, this is the hairpinning part/u turn nat.
- source static MIRTH-PROD\_1 NAT\_MIRTH\_PROD\_1 the source of the traffic has to be host 10.10.15.175 and it has to be translated to the IP address of 192.16.10.1, this will be 192.16.10.1
- destination static RWJBH\_RAAY\_NAT RWJBH\_NEWBRUNSWICK: the destination of the traffic is 10.254.254.67 and it has to be translated to customers real addresses.

The part I’m having a little confusion on is the destination part. Can you help clear this portion up in a simple way that is easy to understand?

Thanks

---

<div class="post-metadata">

**Author:** ![dionisisk](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/dionisisk/32/453_2.png) [@dionisisk](https://forum.networklessons.com/u/dionisisk)\
**Post date:** [March 22, 2017, 3:38pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/13 "2017-03-22T15:38:29Z")

</div>

mismatch configuration -

just to be sure that i understand what i am reading i think there is a mismatch between the diagram and configuration . instead of the address 192.168.2.220 it has to be 192.168.2.200 in the diagram and i think in the configuration the object network WEB\_SERVER it has to be WEB\_LOCAL where there is the static nat for INBOUND TRAFFIC .  
Please if i am wrong let me know , Many thanks

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [March 26, 2017, 7:22pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/14 "2017-03-26T19:22:26Z")

</div>

Hello Dionisis

Good catch! You are correct. I will let @ReneMolenaar know of the error and he can fix it.

Thanks again!

Laz

---

<div class="post-metadata">

**Author:** ![dionisisk](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/dionisisk/32/453_2.png) [@dionisisk](https://forum.networklessons.com/u/dionisisk)\
**Post date:** [March 28, 2017, 8:56am UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/15 "2017-03-28T08:56:05Z")

</div>

Hello Laz

Its important for me the details of a topic to understand a concept . So thanks for your reply.

Dionisis

---

<div class="post-metadata">

**Author:** ![kizit00](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/ecae2f/32.png) [@kizit00](https://forum.networklessons.com/u/kizit00)\
**Post date:** [February 12, 2018, 12:48am UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/16 "2018-02-12T00:48:45Z")

</div>

Hi Rene! Great Lesson. Just wanted to point out a typo that may need to be fixed. In the beginning of the lesson I think the webserver IP is supposed to indicate “192.168.1.2” not “192.168.2.2”. Please see below:

“Above we have a webserver using IP address **192.168.2.2** on our internal LAN. The ASA is configured so that IP address 192.168.2.220 on the outside is translated to IP address 192.168.1.2. This allows users on the Internet to access our webserver.”

---

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [February 14, 2018, 9:22am UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/17 "2018-02-14T09:22:39Z")

</div>

Hello Leroy

Yes you are correct and thanks for catching that. I’ll let @ReneMolenaar know.

Laz

---

<div class="post-metadata">

**Author:** ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)\
**Post date:** [February 16, 2018, 8:49am UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/18 "2018-02-16T08:49:53Z")

</div>

Thanks Leroy, just fixed it!

---

<div class="post-metadata">

**Author:** ![kizit00](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/ecae2f/32.png) [@kizit00](https://forum.networklessons.com/u/kizit00)\
**Post date:** [February 16, 2018, 4:10pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/19 "2018-02-16T16:10:32Z")

</div>

No problem! Thank you Rene!

---

<div class="post-metadata">

**Author:** ![shahryaralik](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/s/e480ec/32.png) [@shahryaralik](https://forum.networklessons.com/u/shahryaralik)\
**Post date:** [December 10, 2018, 12:26pm UTC](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819/20 "2018-12-10T12:26:05Z")

</div>

Rene, you are doing a great job. A very difficult topic explained in simple way.

Just to add, one reason why we need hairpining is that there are some applications in the DC which need to create control channels on the public IP in order to communicate hence they need inside to inside NAT.

[Next page](https://forum.networklessons.com/t/cisco-asa-hairpin-internal-server/819.md?page=2)
