Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running Zentyal as gateway on my network. My domain points to public ip on external interface of zentyal server. I have setup port forwarding on my zentyal server to forward all incoming traffic on port 80 to my web server inside the network. It works fine. But I try to access the same domain from internal network, it does not forward traffic to web server, instead shows me the page from zentyal server itself (zentyal's web server). I tried to setup port forwarding on internal port of zentyal, but it doesnot work.

Please help.

share|improve this question
1  
You forgot to mention what you are currently doing and what you have tried ;) –  0xC0000022L Feb 27 '13 at 14:55
    
@0xC0000022L - I am trying to make my domain work from internal network. –  Ehs4n Feb 27 '13 at 16:09
    
yes, you wrote that. Only there are at least half a dozen methods I can come up with from the top of my head how to forward traffic. Also you wrote you already tried something: whathaveyoutried.com ? –  0xC0000022L Feb 27 '13 at 16:16
add comment

1 Answer 1

up vote 1 down vote accepted

I've had this problem a few times before. The easiest way to solve it is to make sure you resolve your domain name as internal for your internal hosts. Depending on the size of your internal network and how you have it setup, there are a couple of ways to accomplish this:

1.- When you just have few internal hosts in your internal network, just modify their "hosts" file (i assume windows C:\WINDOWS\system32\drivers\etc\hosts) to include a line for your domain, pointing to your INTERNAL web server address, i.e. a line like:

3.3.3.3 my.domain

where "3.3.3.3" is the INTERNAL ip address for what you call "my web server", usually something like 192.168.0.12; and "my.domain" is what you literally call "My domain".

2.- Setup an internal dns server that essentially does the same job as the previous point. This is way more difficult to set up, and you need it when you have MANY hosts in your internal network. Let me know if you need it.

The most important thing you need to AVOID is that the hosts in your INTERNAL network resolve YOUR domain with your PUBLIC ip, and instead use your INTERNAL PRIVATE ip.

HTH,

Pedro.

share|improve this answer
    
Thanks @Pedro. I would definitely like to setup dns server as the client number is more than 200. Zentyal has inbuilt dns server, which i may need to configure. P.S. Zentyal is using BIND as its dns server. –  Ehs4n Feb 27 '13 at 16:16
    
The answer was helpful, as I set up an entry for my domain in my local dns server. Pointed the domain to my local IP address and set up port forwarding on my WAN interface with public IP to forward to local IP address. Updated my domain entry on registrar to point to my external IP (on WAN port). This way the domain is accessible from both outside the network as well as internal network. –  Ehs4n Mar 3 '13 at 7:26
    
Perfect! I'm glad it helped. :) –  Pedro Bezunartea López Apr 10 '13 at 14:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.