Apache - DNS Name Problem

Help with issues regarding installation of Debian

Apache - DNS Name Problem

Postby tocsikbt » 2018-02-03 19:27

Dear All,

I installed an Apache on my debian server.
After that I registered a dns name on noip.com and I set a port forwarding (source port: 80, ip address of my server, destination port: 80) on my router at home.
When I try reach the default index.html from the outside (internet side) with the dns name (example.ddns.net), than it's working fine.
But when I try reach the default index.html from my private lan with the dns name, than it isn't working. (ERR_CONNECTION_REFUSED)
It is working from my private lan just in case, when I try it with the private ip of my server.

Do you have any idea for this issue?

Thank you in advance!
tocsikbt
 
Posts: 2
Joined: 2018-02-03 19:00

Re: Apache - DNS Name Problem

Postby dcihon » 2018-02-03 20:39

/etc/hosts file
dcihon
 
Posts: 233
Joined: 2012-09-23 16:18

Re: Apache - DNS Name Problem

Postby tocsikbt » 2018-03-03 16:53

The problem has been resolved. I added the DNS name and the IP-Address of the Server to the host file of my PC. So I can reach my website from the outside and from my private LAN also.
tocsikbt
 
Posts: 2
Joined: 2018-02-03 19:00

Re: Apache - DNS Name Problem

Postby p.H » 2018-03-04 08:22

tocsikbt wrote:But when I try reach the default index.html from my private lan with the dns name, than it isn't working. (ERR_CONNECTION_REFUSED)

The port forwarding in your router does not work from the private LAN. Quite common. Port forwarding from the private LAN requires special handling in order to work.

tocsikbt wrote:The problem has been resolved. I added the DNS name and the IP-Address of the Server to the host file of my PC.

No, the problem has not been resolved. This is just a workaround, with shortcomings (as often with workarounds).

tocsikbt wrote:So I can reach my website from the outside and from my private LAN also.

Not on the same computer. If you try to reach your web site from the outside on that computer, it will use the private IP address defined in the hosts file and fail.

A better solution is that the DNS server on your private LAN serves the private address.
p.H
 
Posts: 600
Joined: 2017-09-17 07:12


Return to Installation

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable