Проверку можно осуществить с помощью утилиты iptables-restore.
Парметры запуска:
iptables-restore -tv /etc/iptables
Если в конфигурационном файле нет ошибок, то вывод будет примерно таким
Spoiler |
SelectПоказать> |
# Generated by iptables-save v1.4.7 on Fri Mar 13 14:11:54 2015
Flushing chain `PREROUTING’
Flushing chain `OUTPUT’
# Completed on Fri Mar 13 14:11:54 2015
# Generated by iptables-save v1.4.7 on Fri Mar 13 14:11:54 2015
Flushing chain `INPUT’
Flushing chain `FORWARD’
Flushing chain `OUTPUT’
# Completed on Fri Mar 13 14:11:54 2015
# Generated by iptables-save v1.4.7 on Fri Mar 13 14:11:54 2015
Flushing chain `PREROUTING’
Flushing chain `INPUT’
Flushing chain `FORWARD’
Flushing chain `OUTPUT’
Flushing chain `POSTROUTING’
Flushing chain `PREROUTING’
Flushing chain `INPUT’
Flushing chain `OUTPUT’
Flushing chain `POSTROUTING’
|