What's new

Accesing webserver domain from router itself

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

eliz82

Occasional Visitor
I have installed Asus Merlin + Entware NG on my Asus RT-AC56U. Then I installed webserver+php+mysql using this tutorials:
https://github.com/RMerl/asuswrt-merlin/wiki/Lighttpd-web-server-with-PHP-support-through-Entware
I'm redirecting port 80 to port 83 and i'm using that iptable config like in the tutorial

Everything is ok. I have a domain like this: http://myname.ddns.com (port 80)
1) it is accessible and from outside networks (internet) and working ok
2) it's accessible and from inside networks (my LAN) and working ok
And now the strange part:
3) it's not accessible from router itself

How I know that? I tried 3 methods and all have the same result.
1) ssh tunneling from outside network. all sites are loading correctly except http://myname.ddns.com
2) I made a PHP script on my webserver that is using CURL function to open a website. it's working with any outside site except http://myname.ddns.com
3) elinks text webrowser from ssh console
All 3 methods are redirecting my domain http://myname.ddns.com to Asus router login page.
(I have moved Asus Login page to HTTPS, but then instead of redirecting is not founding the site.)

Any solutions?
 
in case it helps this is my iptables --list
Code:
admin@RT-AC56U-D4A0:/tmp/home/root# iptables --list
Chain INPUT (policy ACCEPT)
target  prot opt source  destination
ACCEPT  tcp  --  anywhere  anywhere  tcp dpt:83

Chain FORWARD (policy ACCEPT)
target  prot opt source  destination
TCPMSS  tcp  --  anywhere  anywhere  tcpflags: SYN,RST/SYN TCPMSS clamp to PMTU
ACCEPT  all  --  anywhere  anywhere  state RELATED,ESTABLISHED
logdrop  all  --  anywhere  anywhere
logdrop  all  --  anywhere  anywhere
logdrop  all  --  anywhere  anywhere  state INVALID
ACCEPT  all  --  anywhere  anywhere
ACCEPT  all  --  anywhere  anywhere  ctstate DNAT
ACCEPT  all  --  anywhere  anywhere

Chain OUTPUT (policy ACCEPT)
target  prot opt source  destination

Chain FUPNP (0 references)
target  prot opt source  destination

Chain PControls (0 references)
target  prot opt source  destination
ACCEPT  all  --  anywhere  anywhere

Chain SECURITY (0 references)
target  prot opt source  destination
RETURN  tcp  --  anywhere  anywhere  tcpflags: FIN,SYN,RST,ACK/SYN limit: avg 1/sec burst 5
logdrop  tcp  --  anywhere  anywhere  tcpflags: FIN,SYN,RST,ACK/SYN
RETURN  tcp  --  anywhere  anywhere  tcpflags: FIN,SYN,RST,ACK/RST limit: avg 1/sec burst 5
logdrop  tcp  --  anywhere  anywhere  tcpflags: FIN,SYN,RST,ACK/RST
RETURN  icmp --  anywhere  anywhere  icmp echo-request limit: avg 1/sec burst 5
logdrop  icmp --  anywhere  anywhere  icmp echo-request
RETURN  all  --  anywhere  anywhere

Chain logaccept (0 references)
target  prot opt source  destination
LOG  all  --  anywhere  anywhere  state NEW LOG level warning tcp-sequence tcp-options ip-options prefix "ACCEPT "
ACCEPT  all  --  anywhere  anywhere

Chain logdrop (6 references)
target  prot opt source  destination
LOG  all  --  anywhere  anywhere  state NEW LOG level warning tcp-sequence tcp-options ip-options prefix "DROP "
DROP  all  --  anywhere  anywhere
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top