Web Server on PC and OpenWrt

I have Caddy Web Server on my PC with web app. Which (app) I want to access from outside of my local network. In addition, I have TP-Link TL-WR740N v4 with installed OpenWrt 18.06.1.
As I understood, to access my server on PC, I need to made port forwarding. So I did.

But when I tried access server by from my_ip:8080 (learned it here ifconfigDOTco it couldnt connect: "The connection has timed out", on localhost:8080 it works perfectly.

What i am doing wrong?

From "inside" your network, or outside?

Typically, you can't access services that are NAT-ed on your public IP from inside by using your public IP. You need to / should go "direct". Proper DNS can manage this by overriding the rest-of-world resolution for internal hosts.


@jeff is right that you have to test from completely "outside". Use a separate Internet connection such as a hotspot on a phone.

Web servers are always TCP. Though also allowing UDP shouldn't break anything, you should set the proto to only TCP.


From outside, used mobile internet

didn't help

The next thing to consider would be whether your ISP router is fully bridged through so that you have the public IP address on the WAN interface. If the ISP modem is also NATting you have to either reconfigure it so it bridges through, or forward the port in the modem/router. The modem / router would forward to your OpenWrt router's WAN address.

Also not all ISPs allow incoming connections at all, or only on certain ports.


Run tcpdump on the router.
Perform tests from the internet.
Can you see your internet requests?

1 Like

I have no idea why but it worked today, when I restarted my router.

But, anyway, thanks for help all of you.

Added: I think the problem was on my internet provider side cos as I noticed I received today new IP, tho yesterday everything worked when I connected directly to cable. Could provider somehow interfere in routers work? Or it's a magic router restart?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.