Accessing port forwarding service from inside the network

1

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.

Ehs4n

Posted 2013-02-27T14:51:45.523

Reputation: 113

1You forgot to mention what you are currently doing and what you have tried ;) – 0xC0000022L – 2013-02-27T14:55:29.327

@0xC0000022L - I am trying to make my domain work from internal network. – Ehs4n – 2013-02-27T16:09:00.137

Answers

2

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.

Pedro Bezunartea López

Posted 2013-02-27T14:51:45.523

Reputation: 136

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 – 2013-02-27T16:16:35.267

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 – 2013-03-03T07:26:00.617

Perfect! I'm glad it helped. :) – Pedro Bezunartea López – 2013-04-10T14:31:14.747