Инструменты пользователя

Инструменты сайта


iptables._primery_ispolzovanija

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слеваПредыдущая версия
Последняя версияСледующая версия справа и слева
iptables._primery_ispolzovanija [2017/08/25 17:14] – [Добавление правил в iptables] daniiliptables._primery_ispolzovanija [2017/08/25 17:23] – [Добавление правил в iptables] daniil
Строка 227: Строка 227:
 iptables -I INPUT 3 -p tcp -m multiport --dports 2200 -j f2b-sshd iptables -I INPUT 3 -p tcp -m multiport --dports 2200 -j f2b-sshd
 </code> </code>
 +
 +----
 +
 +===== Сохраняем правила iptables. =====
 +
 +  * **Через iptables-save:**
 +
 +<code bash>
 +iptables-save > /etc/iptables.rules
 +</code>
 +
 +  * **Через сервис iptables:**
 +
 +<code bash>
 +service iptables save
 +</code>
 +
 +----
 +
 +===== Восстановление правил iptables =====
 +
 +  * **Из дампа, сделанного при помощи iptables-save:**
 +
 +<code bash>
 +iptables-restore < /etc/iptables.rules
 +</code>
 +
 +----
 +
 +===== Установка политики по умолчанию =====
 +
 +<code bash>
 +iptables -P INPUT DROP
 +iptables -P OUTPUT DROP
 +iptables -P FORWARD DROP
 +</code>
 +
 +----
 +
iptables._primery_ispolzovanija.txt · Последнее изменение: 2017/08/25 00:00 (внешнее изменение)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki