автозагрузка iptables
Добавлено: 09 ноя 2023, 15:41
автозагрузка iptables
Первым делом создам файлы правил iptables и ip6tables выполнив следующие команды:
# touch /etc/firewall.conf
# touch /etc/firewall6.conf
Сохранять правила можно будет командами соотвественно
# iptables-save >/etc/firewall.conf
# ip6tables-save >/etc/firewall6.conf
Далее создается скрипт скрипт под именем iptables, в каталоге /etc/network/if-pre-up.d/ со следющим содержимым:
#!/bin/sh
iptables-restore < /etc/firewall.conf
ip6tables-restore < /etc/firewall6.conf
Создание и пометка испольняемым мледующим образом:
# nano /etc/network/if-pre-up.d/iptables
# chmod +x /etc/network/if-pre-up.d/iptables
https://olorg.ru/page/debian-avtozagruzka-iptables-i-ip6tables
https://wiki.enchtex.info/howto/ubuntu/ubuntu20.04_iptables_at_startup
https://upcloud.com/resources/tutorials/configure-iptables-debian
информация о пакете iptables:
apt info iptables
Первым делом создам файлы правил iptables и ip6tables выполнив следующие команды:
# touch /etc/firewall.conf
# touch /etc/firewall6.conf
Сохранять правила можно будет командами соотвественно
# iptables-save >/etc/firewall.conf
# ip6tables-save >/etc/firewall6.conf
Далее создается скрипт скрипт под именем iptables, в каталоге /etc/network/if-pre-up.d/ со следющим содержимым:
#!/bin/sh
iptables-restore < /etc/firewall.conf
ip6tables-restore < /etc/firewall6.conf
Создание и пометка испольняемым мледующим образом:
# nano /etc/network/if-pre-up.d/iptables
# chmod +x /etc/network/if-pre-up.d/iptables
https://olorg.ru/page/debian-avtozagruzka-iptables-i-ip6tables
https://wiki.enchtex.info/howto/ubuntu/ubuntu20.04_iptables_at_startup
https://upcloud.com/resources/tutorials/configure-iptables-debian
информация о пакете iptables:
apt info iptables