Is the Internet absolutely necessary in an openwrt environment?

I would like to implement openwrt nodogsplash in an environment without internet. Is this a possible way?

You don’t need any internet to run OpenWrt and you can run it only on LAN setup. But you would probably need to manage time and date by alternative offline method other than standard NTP.

You don’t even need a meaningful network setup but that will probably get boring after a while.

As the purpose of a captive portal is to control access to the Internet then not having Internet makes it all a bit pointless.

Maybe protected resources inside office network ?
OP know/heard about hotspot and now will try to implement inside office/enterprise network
not every network need to be connected to internet :slight_smile:

1 Like

That is true, but the OP specifically asked if nodogsplash will work on a network without Internet.
Captive portals (nodogsplash is an example) rely on captive portal detection running on the client device or captive portal information supplied to the client device by the captive portal via dhcp. The client device will then attempt to access a specific url and be redirected to the portal using a special stripped down browser built into the client operating system specially to display the login/splash pages and nothing else.
Without an Internet feed, there will be no response unless you do spoofing on dns or dhcp to try to fool the client operating system into triggering the splash page of the portal. If you succeed in spoofing the redirection, it will be of little use to the user.

If the OP is wanting to provide information to the user, for example at a museum, then providing a qr code to scan, at every exhibit at the museum to bring up the relevant information for the location, is a much better way to do it.

6 Likes

When the user connects to Wi-Fi, there is currently no Internet. It says I'm not connected to the internet. However, when I press Wi-Fi, I want to show the page of the local environment I built.Is there any way to do this?

Mobile devices tend to not like being on an air-gapped network (i.e. not connected to the internet) because they will usually switch to their cellular connections to maintain connectivity. However, they will usually give the option to stay on wifi despite the lack of internet connectivity.

You can try the "fake internet service" package...

That said, it would be good if we understood your desired use-case. As pointed out previously, a captive portal doesn't really make a lot of sense when internet connectivity is not available, but there may still be reasonable applications for it and/or other methods to achieve your goals.

4 Likes

I'm using openwrt 22.03.5, and while installing the package, it says Unknown package fakeinternet Unknown package luci-app-fakeinternet. Is there a solution?

If these packages are not found in the official feed/repo for your version of OpenWrt, you will need to add a custom repo to your router following instructions on GitHub/jsDelivr first.

Be sure to also read the complete thread that I linked earlier.

4 Likes

You can make the standard splash page pop up with a one line change to the dnsmasq config, making it spoof dns. Fakeinternet does similar but is much more sophisticated.

But this will give you the splash page in a very restricted browser that is built into the client device operating system. This "mini" browser is designed to display ONLY captive portal splash pages.

If what you are trying to display is pure html with only text and images - no hyperlinks, no javascript, no downloadable css, then you might get away with it.

But even then, most mobile devices will timeout in a fairly short time, disconnect and search for an alternate wifi to use or switch to a "cellular/4g etc" connection.

2 Likes

So, if there is a DB connection to the PHP source, the local environment will be very difficult, right?

nodogsplash serves a simple html file (with possible templated substitution of some nodog variables), so php and db access is not supported.

1 Like

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