Skip to content

Instantly share code, notes, and snippets.

@LuisPalacios
Last active April 28, 2023 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LuisPalacios/3345a1ad94231a74fe5442c738e97cb0 to your computer and use it in GitHub Desktop.
Save LuisPalacios/3345a1ad94231a74fe5442c738e97cb0 to your computer and use it in GitHub Desktop.
Termina de activa reglas con iptables tras tener la red ya disponible.
# Fichero systemd:
# /etc/systemd/system/firewall_2_post_network.service
#
# Termina de activa reglas con iptables tras tener la red ya disponible.
#
# Para activarlo ejecutar:
# systemctl enable firewall_2_post_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 despues de la red
Wants=sys-subsystem-net-devices-ppp0.device internet_wait.service network-online.target
After=sys-subsystem-net-devices-ppp0.device internet_wait.service network-online.target
[Service]
Type=oneshot
ExecStart=/bin/bash /root/firewall/firewall_2_post_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