Commit 45b26b1e authored by Gabriel Detraz's avatar Gabriel Detraz
Browse files

Remplissage complet de l'ipset au démarage

parent ccfbb725
......@@ -21,6 +21,9 @@
import os, sys
from django.core.wsgi import get_wsgi_application
from os.path import dirname
proj_path = "/var/www/portail_captif/"
# This is so Django knows where to find stuff.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "portail_captif.settings")
......@@ -29,9 +32,18 @@ sys.path.append(proj_path)
# This is so my local_settings.py gets loaded.
os.chdir(proj_path)
from users.models import restore_iptables, apply
from users.models import restore_iptables, create_ip_set, fill_ipset, apply
from portail_captif.settings import AUTORIZED_INTERFACES
application = get_wsgi_application()
# Creation de l'ipset
create_ip_set()
# Remplissage avec les macs autorisées
fill_ipset()
# Restauration de l'iptables
restore_iptables()
# Activation du routage sur les bonnes if
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment