K
K
korsamc2018-10-08 16:57:15
Debian
korsamc, 2018-10-08 16:57:15

Have I implemented routing correctly in iptables?

I am writing a captive portal referring to this source and similar ones, created a chain of rules, and everything seems to redirect as it should, but after registration it only returns to the site from which I came, I can’t understand where I made a mistake. Here is the source of my project and it would also be interesting to know how to implement "511 Network Authentication Required" . so that when selected, the registration page immediately opens.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
korsamc, 2018-10-09
@korsamc

Set permission for apache in /etc/sudoers
Allow console for www-data user: Added sudo
to the script itself

shell_exec("sudo iptables -t mangle -I internet 1 -m mac --mac-source ".$mac." -j ACCEPT");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question