Can't Reach Public IPs Internal Server?


We can't reach the public IP addresses on our in-house server (host unreachable) from our NAT clients, but the rest of the Web and our internal networking is fine.

Here's our topology:

Server NIC #1: <---> Hub
Server NIC #2: - 37/ <---> Hub
Cisco 675 DSL Router Ethernet: <---> Hub
Cisco 675 DSL Router WAN:

Clients: (DHCP on router) <--> Hub

The public addresses are hosted on our server and are also shared via NAT.

I tried setting up routes for each public IP to a private IP, but my servers became unreachable.

(I have yet to find a Cisco 675 NAT configuration that works for blocks of multiple IPs that also need static routes.)

I have two NICs so that I don't have file and print sharing on my public IPs and I can do port filtering at the NIC.

Why would the public IPs that I'm hosting be unreachable by my clients?  Is there a simple fix?


Donald Newlands

Who is Participating?
What you are experiencing is fairly common.  There are several solutions to it though.  You are basically NATing and internal clients address to a public address..then reNATing the packets destination address froma public address to a private address of the web server.

You can set up an internal DNS zone and point all of your clients to the internal DNS server.  You can then resolve teh web server to the private address for the clients.  This prevents any NAT operations since teh clients are talking directly to the private address...they will never send the packets to the router. Then you caould set up a public DNS zone for the rest of teh world.  This zone will contain your public IP address so the rest of the world can go through the NAT process. The nice thing about this is that it reduces a little of the load on the router.  it also improves network performance since the packets will not have to bounce off of the router.  The down side is that you will need to set up the private DNS zone in addition to the public DNS zone.

Another solution may be possible.  Cisco has recognized this problem and they have a fix for it.  I don't remember what it is called but here is how it works...some routers may not support this but I know the PIX515 firewall does.

Basically the router intercepts all of the inbound DNS responses for your internal servers public then sustitutes the servers internal address into the DNS packet.  The client thinks the name resolved as usual and is happy...the packets to the host doesn't need to be NATted so the double NAT problem is solved.  You do not need to set up any new DNS zones...but you will need a router that supports this...and of course it will have to be configured.
What's the default gateway on your clients?

It would help if you can print the route tables from the server and the cisco routers.

your diagram doesn't really make sense.

Where are your two server NICS plugged into?  show us a detailed map.  Also, why do you have a Public IP address on your server if it's internal?  And why are you trying to access your servers public IP address?

To answer your question, you have an asymmetrical routing
problem.  for your internal clients to get to the public IP
address of your server, it has to go to the router, right?
If you have it setup correctly to push that traffic to the server's public address then the server will recieve it on that port but his path back to your internal workstation is out his other port and that can be a problem.  You might want to try putting a static route on your internal workstation that says "route -p add [pubIPaddressofserver] [privIPaddressofserver].
this will cause it to take same path to and return.
I would try something like that.

But, like I said it's hard to tell what's happening because your description isn't detailed enough to even know the physical/logical layout of your network.
On-Demand: Securing Your Wi-Fi for Summer Travel

Traveling this summer?Check out our on-demand webinar to learn about the importance of Wi-Fi security and 3 easy measures you can start taking immediately to protect your private data while using public Wi-Fi. Follow us today to learn more!

Your description makes sense even if the design happens to be a bit unorthodox.  What jwalsh88 had to say about the routing is true - your internal clients will probably not route through the 675 back to your server.  That is a fairly complex NAT function that most routers will not perform - because it is generally not needed.  

Rather than physically addressing your server with public IP's, a traditional approach would be to keep all internal addresses on the inside and address the server accordingly.  The process of getting those external (or public) IP addresses to your server is a function of NAT.  The router is responsible for mapping the external addresses to the internal addresses.  You have the option of mapping multiple external addresses to 1 internal address or you can give your server multiple internal addresses and map the public addresses to them on a 1-to-1 basis.  This is very typical if you have multiple FTP sites on your server.  This should eliminate the problem for internal users not being able to get to the server, because you are now assigning the server addresses that your internal clients can get to normally, and your external clients can get to via NAT.

Hope this helps,
Sorry just wanted to add this - your configuration steps would be to address the server according to your needs, and then configure static NAT statements on the 675 to map the external addresses to the internal server addresses.
scraig84, He has already stated that he wants two seperate NICs for the server so he can control access to that Public NIC differently then the Private NIC.
I was laying out all the options.  I know that he probably would not want to use just 1 internal address.  However, he can certainly still use that second NIC, replace the external addresses with public addresses and map the external address to those internal addresses.  This would still allow him to treat those addresses seperately.  As long as he doesn't map an external address to one that is performing file sharing, he is getting the desired functionality mentioned and the same level of security.  Let's be honest here though - any time you are plugging your internal and external cards into the same hub (or running them on the same box for that matter) you are running serious security risks.  However, shoring up the security concerns here will be costly to say the least.  Everyone has to weigh the cost vs. security for themselves.
Looks like Nic with public address has a 24 bit subnet mask where your router has a 29 bit subnet mask.  Im assuming your network is setup as follows:

Internet<---><--Router--><--Hub-->                                                       |
                                          |             |
                                   NIC #1            Client
                                   NIC #2

Is this correct?

The reason your clients can get to the internet is because their default gateway is set to  The reason they can't get to Nic #2 is because NIC#2 isn't on the other side of your default gateway.  Looks like you have some design issues.

Sorry if my diagram stinks, kinda hard to do it in this small window.

I hate drawing diagrams in here.  They never turn out as expected.
Can you post your 675 config?  
Diagram is OK pasted into notepad.
Presumably the 2 NICs have IP addresses on the same private subnet and you can access both of these internally but not the public address that DNS returns which is the outside of the router and the workaround of typing the IP address or having a hosts file entry or internal DNS server is too much of a chore.
You could always bind the public IP address to one of the servers NICs as well as the 2 private ones and also an IP address from that subnet to each client (forget the /29 mask, the router won't know you are doing it) but this is even more messing about.

donaldnewlandsAuthor Commented:
Wow!  Thanks for all the replies!

I think that escheider put it most succintly when he wrote, "it looks like you have some design issues". :)  

Regarding escheider's diagram, I'm not sure about the 29 bit mask...  (I know enough only to have gotten myself into this much trouble.)  Generally, we're running translated private traffic and untranslated (?) public traffic on separate NICs in the same server on the same network segment.

Regarding scraig's comment about the "traditional approach",  I tried that but I couldn't get it to work.  I will list the general CBOS configuration that I tried below.

Regarding andyalder's comment about DNS, I'm running a public DNS server on the machine.  I've thought about assiging both a public and a private IP to each service and then looking for a way for DNS or a hosts file to point my clients to the private equivalent for each public address.   But this seems messy.

Regarding router details, the server itself is doing no specific routing or forwarding.

Below is my present CBOS script, which perhaps just needs a simple tweak...?
Cisco 675 CBOS setup for NAT on a block of addresses:

set ppp wan0-0 ipcp
set ppp wan0-0 dns
set int vip0 ip
set int vip0 mask

set ppp wan0-0 authentication enable
set ppp wan0-0 login username
set ppp wan0-0 password password
set ppp restart enabled

set nat enabled

set web disable
set web port 3333
set web remote

set dhcp server enabled
set dhcp server pool 0 ip size 150 netmask
set dhcp server pool 0 dns
set dhcp server pool 0 sdns
set dhcp server pool 0 gateway
set dhcp server pool 0 enabled
set interface eth0 address

Now, to go with the "traditional approach" and straighten out our "design problem", we should just have to set up the fixed private IP addresses on our server and add a series of statements to our router such as:

set nat entry add 80 80 tcp
set nat entry add 21 21 tcp
set nat entry add 25 25 tcp

Right?  I could try again, but so far it doesn't work.

With this setup on the server I had NIC #1 (my "private" NIC) set to, and assigned to NIC #2 (the public NIC).

When you say "it doesn't work" - what exactly doesn't work?  Are users on the outside able to access services?  If so, its working.  

You mention that a split DNS configuration is messy, but it is what is needed.  Users on the inside will need to resolve to private IP's and external users will need to resolve to external IP addresses.  Generally, this is done with multiple DNS servers in a wide variety of configurations.  You could use host files like you said, but that does get a bit cumbersome.  I'm assuming that you have a relatively small shop based on the configuration (I apologize if I'm wrong).  What I have seen most often in smaller configurations such as yours, is using a box on the inside to do internal DNS, and contracting the ISP to perform external DNS resolution (this will involve getting the root servers redirected).  Since the databases will be different, they need to be managed completely seperately, so if there is a change, the ISP would need to be contacted.  The only other option I know of is using a "split-brain" DNS product that allows different resolution based on the IP address receiving the request.  I don't know of any of these that come cheap however.

Hope that helps some.
This is my best guess:

Cisco 675
-Hub/Switch-==Internal Hosts
Server with 2 NICS plugged into
Same physical network with seperate IP addresses.
One nic is translated to a public address.

And when you resolve this server it pulls the public address.  Well that traffic gets sent to the router and the router might not be able to translate it to the private address as the request came from the same interface as the traffic would get sent out.  I think it has a problem with translating the IP address only when the traffic comes in the external interface.  I am not sure though since I don't have any experience with the 675 DSL router.
jwalsh, thats exactly what I had in mind when i tried to draw my diagram.


there are two good solutions for your problem, and other experts may have commented on this, but I didn't read everyones response:

At a high-level overview:

1. Only 1 nic in the server with a private address.  Have all needed ports, from outside your local network, forwarded to this address.  Internal users would access your server on the local network.

2. Only 1 nic in the server with a public address.  Place this on the same physical subnet as the external interface of your router.  Users from the internal network would route across your router.

my 2cents worth..
Me thinks neither NIC has a public IP address as far as the server understands although it has multiple private IP addresses since strawberry cycleworks and Portland, Oregon 3D and mdaemon mailhost are there.

scraig84>> You mention that a split DNS configuration is messy.
Well actually it was me that said that but you are the first to say it is not messy and is the proper way to do it. There's no incoming DNS redirection on the config but even if there was the incoming queries could be sent to one box and the internal clients set to query another. It really isn't much extra work, you create a new site and have to manually update 2 servers who both think they are master. Split DNS is the way to go, next week I fit a sidewinder f/w with 2 DNS servers and 3 mailhosts in the same box, wish me luck :)
donaldnewlandsAuthor Commented:

scraig >> When I say it (the mapped configuration) doesn't work, I mean if I try to access the servers from the outside, they don't respond.

escheider >> I think that's what I've got, except that there are five public addresses on the one NIC and one private IP on the other NIC.

I think in general I will try two things:

1) Try to set up port mappings again so that we have public addresses only at the router (pure NAT).

2) If pure NAT doesn't work, try to set up Win2K Server DNS for a split configuration or contract out DNS services as suggested.

Thanks all!  -- Is there a way to accept all comments as answers or do I have to pick one?

donaldnewlandsAuthor Commented:
Right now, I'm using hosts files on on the machines that need it to point them to the private addresses for our servers.

Will Windows 2000 Server DNS Server allow me to set up separate zones for different addresses, or do I have to run another DNS server application?
It depends on what you want to do...if you want the zones to have teh same name, then you will have to have a private DNS and a public DNS each on their own server.

Basically you set up a DNS server inside the firewall and set up a zone MYCOMPANY.COM and only place private IPs in the zone.  Then point all of your internal clients to this DNS server...this DNS server will resolve the names first..then if it can't resolve names, it will send them to an upstream DNS server.  The advantage here is that employees will use the same naming inside the firewall as they use outside....the down side is that it requires 2 DNS servers.

Another alternative is to use a single DNS server and put a zone on it called MYCOMPANY.COM that holds allof the public resolutions.  Then create another zone called MYCOMPANY.LOCAL that holds all of the private addresses.

The down side here is that employees must access your website as WWW.MYCOMPANY.LOCAL when they are inside the firewall and WWW.MYCOMPANY.COM when they are outside.  This configuration only requires 1 server though.

Of course you could always take care of it in the firewall...this is the best way to do it but I am not experienced at doing it...I understand the concept but I haven't actually done it.  I did watch intently as a CCIE did it though. :)

BTW if you are running a PIX515, you should NOT use a 6.x IOS to do really starts assuming MAC addresses of the servers iot translates and really really screws things up..
I beg to differ that "you can always take care of it in the firewall".  This is highly dependent on the type and version of the firewall in question.  Also, I never noticed any mention of a firewall in the above scenario.  

Donald - unfortunately Win2k does not allow for "split brain" functionality and like rcasteel said, you will either need a seperate server (whether its yours or a provider's) or you can set up seperate zones and have internal users reference the application differently.  This of course does not work well if you are using a name dependant site, such as a site using host-header resolution or a site that is coded to a particular name.  It is also awkward if it is an application that is used by internal users inside and outside the company.  It can be a support nightmare to try and get a bunch of users to reference the app differently based on location.

donaldnewlandsAuthor Commented:

Yes having a different name/url to use doesn't work very well for us because there are many places in our site where, unfortunately, the URLs are "absolute".

In the short run, hosts files are working fine and in the long run I'm going to find someone else to host our public URLs (Granite Canyon?).

Donald Newlands
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.