License
This commit is contained in:
parent
d1f0ef10d8
commit
9512cd35ac
16 changed files with 207 additions and 12 deletions
15
archi.nft
15
archi.nft
|
@ -1,3 +1,18 @@
|
|||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
# Variables prpres à l'architecture pour le pare-feu
|
||||
|
||||
# Interfaces de la machine
|
||||
|
|
15
checkmac.nft
15
checkmac.nft
|
@ -1,3 +1,18 @@
|
|||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
# Table checkmac, à bas le spoof d'ips.
|
||||
|
||||
table inet firewall {
|
||||
|
|
15
firewall.nft
15
firewall.nft
|
@ -1,5 +1,20 @@
|
|||
#! /usr/sbin/nft -I /usr/local/firewall -f
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
# Remise à zéro des règles du pare-feu
|
||||
flush ruleset
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2017 David Sinquin <david.re2o@sinquin.eu>
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
|
||||
"""
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
table inet firewall {
|
||||
chain global {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2019 Hugo Levy-Falk <me@klafyvel.me>
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
"""
|
||||
Creates the nat set.
|
||||
|
|
16
main.py
16
main.py
|
@ -1,4 +1,20 @@
|
|||
#! /usr/bin/python3
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
import logging
|
||||
|
|
15
nat.nft
15
nat.nft
|
@ -1,5 +1,20 @@
|
|||
#! /sbin/nft -f
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
table ip nat {
|
||||
|
||||
set radius_federez {
|
||||
|
|
2
nat.py
2
nat.py
|
@ -13,7 +13,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2019 Hugo Levy-Falk <me@klafyvel.me>
|
||||
# Copyright © 2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
"""
|
||||
Creates the nat set.
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
#! /sbin/nft -f
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
table inet firewall {
|
||||
|
||||
chain to_adherent {
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
#! /sbin/nft -f
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
table inet firewall {
|
||||
|
||||
chain to_admin {
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
#! /sbin/nft -f
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
table inet firewall {
|
||||
|
||||
chain to_aloes {
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
#! /sbin/nft -f
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
table inet firewall {
|
||||
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
#! /sbin/nft -f
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
table inet firewall {
|
||||
|
||||
chain to_federez {
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
#! /sbin/nft -f
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
table inet firewall {
|
||||
|
||||
set allowed_daddr_prerezotage {
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
#! /sbin/nft -f
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Copyright © 2018-2019 Hugo Levy-Falk <hugo@klafyvel.me>
|
||||
|
||||
table inet firewall {
|
||||
|
||||
chain to_supelec {
|
||||
|
|
Loading…
Reference in a new issue