Port forwarding from internet to lan

Hello,
Router is connected to internet via 4G. I am able to remotely access the router via cloud login (the router is connected and I have the remote access URL and I am able to see the login page of the router. I want to access a device connect on the lan port of the router. So I port forward from wan (4g included in wan zone) port 80 to specific ip of the device connected on lan port via port 443 (the device has https)

Now when I save the settings and access the cloud link again, I get page cannot be displayed. Am I doing anything wrong here?

what's cloud login ?

3 Likes

Are you even using OpenWrt on that router?

2 Likes

+1 to @eduperez and @frollic 's questions.

In the meantime...

This is not a normal way to connect to an https server, since port 80 is generally http (plain, not https). The browser would likely have difficulty connecting because:

  • if you enter http://mydomain.com, it will connect via port 80 and assume that it is not using SSL.
  • If you enter https://mydomain.com, the browser will assume port 443 and it isn't going to reach the server because your external port 443 is not open/forwarded.

This means that you have to explicitly define both the https and the port 80 as follows:

And, even with the above, it is plausible that some browsers may 'autocomplete' back to http when they see port 80, or they may do some other unexpected thing because of the reasons mentioned above.

EDIT: This also assumes that you have a true public IP address on the router's WAN. Many 4G ISPs do not issue a public IP and instead give you CG-NAT (or RFC1918 NAT) addresses. If you really have a "cloud login" for your router, it isn't OpenWrt, but some 'cloud login' systems can work around the CG-NAT/RFC1918 NAT issues with some clever brokering, so just because you have something working here doesn't mean that you actually have a public IP.

1 Like
  1. Yes the router is on OpenWrt
  2. Cloud login is a Remote Management Access. This router has this feature. We get one unique url per router to access it remotely. When the router is connected and we hit the url, we can see the router login page.
  3. Sample link that I get for cloud access:
    https://<router_cloud_id>ac-link.com:80/
  4. There is no public ip on wan... BTW using 4G, not WAN.

For port forwarding, I am forwarding port 80 to 192.168.1.104 (device ip connected on lan) on port 443.

Is there anyway I can reach the connected device remotely, if I can access the router login page

This is not a standard OpenWrt feature. Did you install a special package for this, or are you using another firmware that is based on OpenWrt?

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik

ubus call system board

No, not without a fairly complex setup involving VPNs and a VPS provider that can provide you with a public IP (these are often paid services, not free).

1 Like