Redirect based on MAC Address
News Landing Page
This script will redirect users of the local network to a page once every week and make them scroll the page to the bottom to press a button or maybe this will be timed like 30 secs and then release the user by changing rules on iptables.
This page will have news about the project; no publicity, no junk.
We are aware there's some captive portals out there, but this is an effort to avoid extra dependencies on the already low memory routers, also to allow flexibility and why would anyone need 99% of unnecessary code from those captive portals.
- [ ] cat dhcp.leases >> $array1
- [ ] cat lista >> $array2
- [ ] if $array1 = $array2 do nothing
- [ ] else add $array1 to $array2 && iptables redirect $array2
(some how the code will need to separate each line of dhcp.leases and fill multiple arrays and do the same to $lista that has already some lines, than it will need to send just the different MAC Address found to $lista and change iptables to redirect just this MAC Addresses because the other ones will already been redirected)
- [X] Once a Week a cronjob clean the list
Developments in the code can be seen here: