Last active
April 28, 2023 10:10
-
-
Save LuisPalacios/d90ff449e2e9886341ffa019008757b4 to your computer and use it in GitHub Desktop.
Activa reglas con iptables llamando a un script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fichero systemd: | |
# /etc/systemd/system/firewall_1_pre_network.service | |
# | |
# Activa reglas con iptables llamando a un script. | |
# | |
# Para activarlo ejecutar: | |
# systemctl enable firewall_1_pre_network.service | |
# | |
# Es fichero está relacionado con este apunte: | |
# https://www.luispa.com/administración/2023/04/08/networking-avanzado.html | |
# | |
[Unit] | |
Description=Activar reglas iptables antes que la red | |
Wants=network-pre.target | |
Before=network-pre.target | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/bash /root/firewall/firewall_1_pre_network.sh | |
RemainAfterExit=yes | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment