4. Common issues - Gguardiola/Sidius-CaptivePortal GitHub Wiki

Access denied for user root

This issue is caused because you don't made the root user accessible from outside

mysql -u root -p

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'password';

\q

First run does not change the config of the captive portal

This is because www-data permissions were not given well

cd /var/www/html/

chown -R www-data:www-data captiveportal

Logs do not load

This issue can be caused by two reasons: you haven't created the logs or you haven't given permissions to www-data
touch /var/log/captiveportal.log

touch /var/log/iptablesRules.log
chown www-data:www-data /var/log/captiveportal.log

chown www-data:www-data /var/log/iptablesRules.log

Iptables do not apply

If you are running the iptables manually from firewall.sh check if have execution permissions

cd /var/www/html/captiveportal/cpanel

chmod +x firewall.sh

Otherwise, if you are running the iptables through "remove all concessions" button, check if www-data have permissions to run iptables commands

sudo visudo

Check if at the end of the file this line exists

www-data ALL=NOPASSWD: /sbin/iptables

If you don't see it, add it

The logo image is not updated when I upload it from the first run

This issue can happen for no reason. Try it again going to yourdomain.org/first_run.php?page=5

If continues without change it, check the folder permissions like here

ImportError: No module named colorama

This happen when the setup.py doesn't detects the colorama module

apt-get install python3-pip

pip3 install colorama

FAILED INSTALLING BIND9, CHECK YOUR INTERNET CONNECTION!

This issue is casued for two reasons: you doesn't have internet connection or your Linux machine have a dependences conflict.

First reason - Network problems

Check if you can ping to internet

ping 8.8.8.8

If the output of the ping is something like Destination Host Unreachable check your network configuration

Check if you can resolve DNS

nslookup www.google.com

If the output of the nslookup is something like NXDOMAIN check your network configuration

Second reason - Dependences conflict

This is caused because the bind9 dependences are broken or apt-get command can find them

apt-get install aptitude

aptitude install bind9

Now when aptitude ask you the first question, type N

Keep the following packages at their current version:

1) bind9 [Not Installed]

Accept this solution? n

Now it will ask you to downgrade de packets, type Y the next two questions

You can now run the setup.py script!

⚠️ **GitHub.com Fallback** ⚠️