0

I am using 3B+ model and was successful in running Kolibri and Kiwix at the same time without using Rachel or Internet in box. I didn't go for these two because of various reasons as I was looking for Kolibri and Kiwix (wikipedia) only.

I changed the port number of Kolibri to 90 as while installing kiwix-serve, Kiwix was unable to occupy Port 80 (Already occupied by nginx and kolibri). By doing so I was able to run Kolibri and Kiwix at the same time. The ip for these two were

Kolibri : 192.168.4.1:9090 Kiwix : 192.168.4.1:80

I also created a Captive/Landing page by configuring sudo nano /var/www/html/index.html file. Linking the above two IP to give on the page for better user interface

The Captive page can be opened at 192.168.4.1:90 (as Port 80 has been occupied by Kiwix)

Now I want to run this captive page when someone connects to wifi hotspot created by RPI. I tried using iptables but it is not giving the desired result. Also changing the /etc/dnsmasq.conf file by adding

address = /#/192.168.4.1 interface = wlan0

is giving unwanted result (Forwarding all HTTP request to 192.168.4.1:80 and not :90)

Please help on this

0

OK. The reason why you're landing on port 80 is that the address line in dnsmasq.conf is just a domain name redirection, and so the client's browser uses the default HTTP port of port 80. Unfortunately there's no way for dnsmasq to tell the client to use port 90 instead. There are two options at this point. Potentially you can use iptables to redirect port 80 traffic to port 90 for a limited time window, but it looks like it would be an easier solution to change the port of kiwix-serve using the --port=PORT command line option.

A starting point for the iptables route if you're interested in getting nitty-gritty with it: Captive Portal using DNSMasq.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.