Byzantium/Byzantium — Issue #93: Turn list of intercepted domains into a config file.
Author: virtadpt
Created: 2012-03-07 03:08:06+00:00
State: open
Labels: Captive portal, Control panel, ISO image - v0.2a

After crying on haxwithaxe's shoulder about the captive portal on IRC, he got me to try Sitwon's original captive-portal.sh script for setting up the portal's IP tables rules. I did so, and following some experimentation discovered that it's actually dnsmasq that isn't doing the right thing and not Sitwon's IP tables rules. I added some domains to /etc/dnsmasq.conf and the captive portal began doing the right thing.

NetworkConfiguration.configure_dnsmasq() was modified to add a number of directives to /etc/dnsmasq.conf.include to intercept resolution requests for certain domains and return the IP address of the client interface for the purpose of testing. Once this code is working as expected modify it so that the list of domains is kept in a user-editable configuration file (/home/guest/intercepted_domains.txt or /etc/intercepted_domains.txt) so we don't have to go back and edit the source code every time we want to add something new.

Perhaps we should consider adding this functionality to the control panel itself.

Reference commit 2f185094164cec1133aa8a7e6891f8a32e59ca54.