How to make access to external ip from LAN?

At home I have a router DIR-615 connected via cable to the Internet with a static ip. Wi-fi access to the Internet through this router connected to a desktop computer with ubuntu 16.04. The computer deployed a web server with a site (test.ru). When I turn to the website from an external Internet all the site opens. When I turn to the website from the same LAN (using same wifi connection) the site is not loaded.

I found the solution is nat loopback. In my router there is no such function, so I suggest either to flash the router with alternative firmware, or to configure a loopback using iptables. I accessed via telnet to the router and entered the command:
iptables-t nat -A PREROUTING policy -d <my external ip> -m tcp -p tcp --dport 80 -j DNAT --to-destination 192.168.0.26:80

and
iptables-t nat -A POSTROUTING -d 192.168.0.26 -p tcp --dport 80 -j SNAT --to-source <my external ip>

But it didn't help.

Here's the output of iptables-t nat-L-n -v:
5bbce9bbecd5c896873194.jpeg
Tell me what did I do wrong? How to solve the problem?
1 answer
March 12th 20 at 07:57
Solution
It's easier using splits taxied. I.e. to make the local cars on test.ru DNS gave a local address. To do this, or Dir 615 this train (if it is specified as a DNS server) or to lift DNS the server on a computer with a web server, register it on the area test.ru with local addresses and specify it as the first , with distribution via DHCP ( if used) or the network connections of computers. You have a computer with the web server also should be the address of the local DNS. If computers are not much can local test.ru they are in the hosts record.

Find more questions by tags Network administrationIptablesNetwork equipmentSystem administrationLinux