LINUX.ORG.RU
ФорумAdmin

firewalld работа после перезагрузки

 


0

1

Доброго времени суток,

Есть сервер на CentOS 7 x64 UEFI Boot

CentOS Linux release 7.6.1810 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.6.1810 (Core) 
CentOS Linux release 7.6.1810 (Core) 

Все работает, кроме firewalld, вернее только после перезагрузки все плохо. То есть если перезагрузить сервер или включить его правила применяются только после systemctl restart firewalld или firewall-cmd --reload

Все файлы на месте, зоны описанные есть, в логах ошибок не наблюдается, стоп/старт и больше ничего. В системном журнале тоже самое, никаких ошибок, запустился, но порты закрыты и только после рестарта демона начинает работать. NetworkManager выключен. Думал, что может что-то криво сделал/установил/сконфигурил, а нет, есть такой же сервак с такой же системой и такой же проблемой, все одинаково.

Уже сломал всю голову, подскажите в какую сторону копать?

Заранее спасибо за любую помощь!


Попробуйте включить debug, в логах должно появиться больше информации.

mky ★★★★★
()
Ответ на: комментарий от mky

Лог снял, но кроме reject-route: INVALID_ICMPTYPE: No supported ICMP type., ignoring for run-time. криминального ничего не вижу, может Вы что-нибудь заметите?

Лог - https://cloud.mail.ru/public/FdYz/s9pYsSoTa

P.S. В логе reboot + systemctl restart firewalld.service после загрузки ОС.

Спасибо за любую помощь!

and1
() автор топика

В догонку!

Порты блокирует, потому что правила почему-то firewalld не применяет. Вот вывод команды iptables -nvL после перезагрузки:

Chain INPUT (policy DROP 139 packets, 26557 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 LOG        tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp dpts:0:1023 LOG flags 0 level 4
    0     0 LOG        udp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            udp dpts:0:1023 LOG flags 0 level 4
    0     0 DROP       tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp dpts:0:1023
    0     0 DROP       udp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            udp dpts:0:1023
    0     0 LOG        udp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            udp dpt:2049 LOG flags 0 level 4
    0     0 LOG        tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp dpt:2049 LOG flags 0 level 4
    0     0 DROP       udp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            udp dpt:2049
    0     0 DROP       tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp dpt:2049
    0     0 LOG        tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp dpts:6000:6063 LOG flags 0 level 4
    0     0 DROP       tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp dpts:6000:6063
    0     0 LOG        tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp dpt:7100 LOG flags 0 level 4
    0     0 DROP       tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp dpt:7100
    1    40 LOG        tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp flags:0x17/0x02 LOG flags 0 level 4
    1    40 DROP       tcp  --  ppp+   *       0.0.0.0/0            0.0.0.0/0            tcp flags:0x17/0x02
    0     0 DROP       icmp --  ppp+   *       0.0.0.0/0            0.0.0.0/0            icmptype 8

Chain FORWARD (policy ACCEPT 5299 packets, 3972K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 90 packets, 7960 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD_IN_ZONES (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD_IN_ZONES_SOURCE (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD_OUT_ZONES (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD_OUT_ZONES_SOURCE (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD_direct (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_dmz (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_dmz_allow (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_dmz_deny (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_dmz_log (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_internal (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_internal_allow (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_internal_deny (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDI_internal_log (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_dmz (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_dmz_allow (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_dmz_deny (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_dmz_log (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_internal (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_internal_allow (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_internal_deny (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain FWDO_internal_log (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain INPUT_ZONES (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain INPUT_ZONES_SOURCE (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain INPUT_direct (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_dmz (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_dmz_allow (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_dmz_deny (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_dmz_log (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_internal (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_internal_allow (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_internal_deny (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain IN_internal_log (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT_direct (0 references)
 pkts bytes target     prot opt in     out     source               destination  
and1
() автор топика
Ответ на: В догонку! от and1

«Кто-то» таки создает эти правила. Ваш КО.
На уровне предположения, загружаете правила при поднятии интерфейса. Смотрите настройки.

anc ★★★★★
()
Ответ на: комментарий от anc

Вы правы!

Да все верно, оказалось pppoe соединение, которое поднималось последним, считало, что оно точно знает как должен быть сконфигурирован фаирвол и все портило. Отучил - все работает как надо! Спасибо за помощь!

and1
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.