Configure port forward to hit internal webserver

Hello,

Networking isn't my strong suit so please let me know if I'm missing any information, or documentation. My goal is to setup a port forward with my open wrt router to point to my internal webserver that I have running on port 443. My ISP is not blocking 443 as I have checked https://www.canyouseeme.org/ and I can validate that port 443 is open at my public IP. When navigating to my ip on port 443 I can see that it is trying to use an open wrt certificate instead of my cert from my webserver which is coming from a CA. Please see my below firewall config and let me know if you have any ideas, or if there is any other information that you need from me to help diagnose. Thanks so much for your help!

router firmware: OpenWrt SNAPSHOT r18728-fb6cf22866

firewall config from /etc/config/firewall

Thanks,

Tim

Please post the output of

iptables -t nat -nvL zone_wan_prerouting

Thanks for responding! Unfortunately, I'm having some issues installing iptables. It saying that my kernel version is incompatible with the version required for iptables-legacy. I tried via command line and the UI. I'll try and dig into that some more so I can get you the output of that command you sent me.

I'm reading more that this is likely due to the fact that I installed a snapshot unknowingly. I'm going to dig into that and hopefully get it resolved so I can install needed packages.

When you're trying to connect are you doing that from inside your LAN?

Sorry, I overlooked this is a snapshot. Most likely it uses nftables, so my post is not relevant.

No I am not, I am testing it through my VPN or my phone with the wifi off.

Any other recommendations on why my port forward is pointing to my router instead of forwarding it to my webserver inside the network?

Ok, latest update. I set up a static IP for my webserver which seemed to make a difference. I can now access my web server from outside my network however, I cannot access it from INSIDE my network if I try to access it via https://mydomain.com. I can access it if I navigate directly to the internal ip of my webserver.

This is normal if you didn't setup a local DNS A record for the web server.

I'm not sure how I setup a DNS A record internally, but I ended up just setting a hostname for that ip that matches my domain name and that worked great! Thank, you!

Sorry to bring everyone along for the ride, but thanks to everyone for your help!

1 Like

Congrats, you figured it out.