Link to home
Start Free TrialLog in
Avatar of chouckham
chouckhamFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Cisco ASA 5510 - web server

Hi All,

I have a web server set up for public access through our Cisco ASA 5510 (see diagram below)
The web application will only answer to http header requests (URL) that are referenced in the license file.
In this case: http://www.abc-web-server.com (this is used as the example in the diagram)

The outside access to the web server works perfectly.

Trying to access the webserver (using the same URL) from within the network doesnt - this is obviously because traffic cannot leave and then renter the same firewall port - or so it seems...
I have read many example of this being able to happen by using the following command: "same-security-traffic permit" (see web link below)
http://www.cisco.com/en/US/docs/security/asa/asa72/command/reference/s1_72.html#wp1289167

I have tried this and both variations of the command, aand have not been able to achieve what I am looking for.

Does anyone know which comman if any will alow me to achieve this?
Has anyone else worked with a similar problem? Is there a more simple work around?


Many thanks!

Craig
web-server.PNG
Avatar of JasonTracy
JasonTracy
Flag of United States of America image

There are two options I know of.  One is the "DNS Rewrite" command.  This is supposed to see outbound DNS requests and rewrite them so the reponse gives the client the internal IP address.  The option for this is a checkbox if using the GUI when you setup the NAT for the webserver.
Here is a link to Cisco that discusses it, they call it "DNS doctoring" here:
http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a00807968d1.shtml

The other option (the one I use on my network) is to setup the same domain on your internal DNS server, but instead of the public addresses, just put the internal addresses.

Either way, the goal it to give your clients the web server's true internal address instead of its NAT address outside the firewall.
ASKER CERTIFIED SOLUTION
Avatar of Pete Long
Pete Long
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dns doctoring only works if your primary dns server is outside your network so that the dns requests actually go through the firewall.
If the web server is in a dmz, the hairpinning won't work either.
If in a dmz, then use two nat statements for d-nat
 static (dmz,outside) <public ip> <private ip> netmask 255.255.255.255
 static (dmz,inside) <public ip> <private ip>  netmask 255.255.255.255

ref:
http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a00807968c8.shtml


That's right, good 'ol destination NAT.
However, the question says the server is in the same network as the clients (although the drawing shows it weird). In this case hairpinning on the same interface is the solution to the problem.
Cheers!
While the debate on DNS doctoring vs hairpinning vs destination NAT vs internal DNS is almost like a MAC / PC / Linux debate, I'd like to make my final case for internal DNS entries:

Assuming you already have an internal DNS server, having a private DNS entry for internal web servers is preferable since it does not touch the PIX/ASA at all.  I don't know what volume you currently have, but as best practice, I like to have the fewest devices involved with any network traffic.  If you use internal DNS, the traffic goes right from the client to the server (if the server is on the internal network), or only through the DMZ if it is there.  Hairpinning and destination NAT add more complexity to the PIX confiiguration, and use more CPU since there is more to process.  I'll admit that in most enviroments, the PIX isn't above 10% CPU, so this usually isn't an issue.

However, any time I can get a job done with less CPU used, I tend to prefer that route.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Indeed! Good call! :)
Cheers!
Avatar of chouckham

ASKER

Hi All,

I appreciate the response on this question! ...some great replies and quite a few good ways of achieving the same result.
I am going try and evaluate them and split the points based on the best results for my situation. Will update the ticket towards the end of the week.

Again thank you!!!

Craig
- Ive learned something myself from this question:) I bookmarked it after the responses but have only just had the chance to revisit and digest both Pugglewuggle and lrmoore's excellent replies.

Its not usually the done thing for a posting expert to ask question in another posters question but it might be relevant to anyone else searching the PAQ (And I don't know the answer :)

Does destination NAT also need a "same-security-traffic permit intra-interface" I'm guessing it should but the Cisco documentation does not have it in the config?

PL
Hi,

Using your example of:

same-security-traffic permit intra-interface
static (inside,inside) <insert public IP of server here> <insert private IP of server here> netmask 255.255.255.255


This would relate to the following with my configuration:

same-security-traffic permit intra-interface
static (inside_core,inside_core) xxx.xxx.xxx.4 172.16.200.50 netmask 255.255.255.255


Should this mean that I should be able to ping xxx.xxx.xxx.4 and get a reply from 172.16.200.50? - currently this doesnt work.
The web address www.mywebapplication.com is set up in DNS to xxx.xxx.xxx.4 when using this url from the internal network, the site is just timing out..

Any ideas?

Thanks,
Craig
Managed to get it working fine with the Inernal DNS Server option.

Hi,

Although i have this working with the internal DNS server, I would like to explore the other options above... Could anyone help me with the ASA "hairpinning"?

Thanks,
-Craig
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
this works fine with PIX firewall version 6.1  with the help of below command
alias (inside) <public-ip> <private-ip> 255.255.255.255
but even i faced problem when we recently migrated PIX to ASA 8.0 now still the problem is there n only i think resolution will be nat dmz ip address of web server to internal IP address and put that entry in internal DNS server and achive this meaning two natings are required.
one to nat DMX Ip of web server to public ip and other to nat DMZ IP of web server to internal IP

thanks,
Yogesh
Can you please post a config chouckham?
u mean PIX config?
Where you been, pug?
Lol busy as imaginable! The economy is crazy and I'm chasing contracts and jobs trying to keep up!

Yes, a PIX config.
hi ,u can see the attached file pl let me also know what is the work arround with this issue as in new setup we are doing patting with same internal IP we cant put duplicate entry using alias command so i think dats a limitation now.
pix.txt
Just a quick question: have you tried the Cisco PIX 6.x to ASA 7 or 8.x migration tool? It's pretty good for getting the configuration translated between devices.

http://www.cisco.com/pcgi-bin/tablebuild.pl/pix