LinuxForum.Fans
Тема

CentOS 7 minimal - Iptables fail.

Автор: Zed 14 сообщений 3047 просмотров
06.09.2014 14:21 · отредактировано #392041

Конфиг:

Показать
text
# Load additional iptables modules (nat helpers)
#   Default: -none-
# Space separated list of nat helpers (e.g. 'ip_nat_ftp ip_nat_irc'), which
# are loaded after the firewall rules are applied. Options for the helpers are
# stored in /etc/modprobe.conf.
IPTABLES_MODULES=""

# Unload modules on restart and stop # Value: yes|no, default: yes # This option has to be 'yes' to get to a sane state for a firewall # restart or stop. Only set to 'no' if there are problems unloading netfilter # modules. IPTABLES_MODULES_UNLOAD="yes"

# Save current firewall rules on stop. # Value: yes|no, default: no # Saves all firewall rules to /etc/sysconfig/iptables if firewall gets stopped # (e.g. on system shutdown). IPTABLES_SAVE_ON_STOP="no"

# Save current firewall rules on restart. # Value: yes|no, default: no # Saves all firewall rules to /etc/sysconfig/iptables if firewall gets # restarted. IPTABLES_SAVE_ON_RESTART="no"

# Save (and restore) rule and chain counter. # Value: yes|no, default: no # Save counters for rules and chains to /etc/sysconfig/iptables if # 'service iptables save' is called or on stop or restart if SAVE_ON_STOP or # SAVE_ON_RESTART is enabled. IPTABLES_SAVE_COUNTER="no"

# Numeric status output # Value: yes|no, default: yes # Print IP addresses and port numbers in numeric format in the status output. IPTABLES_STATUS_NUMERIC="yes"

# Verbose status output # Value: yes|no, default: yes # Print info about the number of packets and bytes plus the "input-" and # "outputdevice" in the status output. IPTABLES_STATUS_VERBOSE="no"

# Status output with numbered lines # Value: yes|no, default: yes # Print a counter/number for every rule in the status output. IPTABLES_STATUS_LINENUMBERS="yes"

# Reload sysctl settings on start and restart # Default: -none- # Space separated list of sysctl items which are to be reloaded on start. # List items will be matched by fgrep. #IPTABLES_SYSCTL_LOAD_LIST=".nf_conntrack .bridge-nf"





Елки-палки, тут только конфиги:


Где собственно сам Iptables? Не могу дополнительные порты открыть или вообще выключить iptables

06.09.2014 15:09 #392049

systemd... Попробуйте родной способ systemd
[console]# systemctl stop iptables[/console]

06.09.2014 15:11 #392050
Zed написал:
Где собственно сам Iptables? Не могу дополнительные порты открыть или вообще выключить iptables

Где? ЕМНИП как обычно в /sbin/ или /usr/sbin/
а порты наверное и так все открыты, там по дефолту всё открыто.

И да, нет такого сервиса как iptables. Точнее, iptables это часть ядра, а команда service iptables лишь настраивает подсистему ядра.

Что-бы узнать состояние, наберите от рута
[console]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination [/console]
такой вывод говорит о том, что iptables "выключена", точнее работает в полностью прозрачном режиме.

06.09.2014 15:14 #392052

"AntiduPb" написал:
systemd
а оно уже в CentOS? OH SHI~
06.09.2014 15:15 #392053
"drBatty" написал:
такой вывод говорит о том, что iptables "выключена", точнее работает в полностью прозрачном режиме.

в CentOS iptables преднастроен разрабами и многие порты закрывает.

06.09.2014 15:17 #392054
AntiduPb написал:
systemd... Попробуйте родной способ systemd
[console]# systemctl stop iptables[/console]

06.09.2014 15:18 · отредактировано #392055
"drBatty" написал:
а оно уже в CentOS? OH SHI~

Redirecting to /bin/systemctl stop iptables.service
systemctl - утилита для управления всем и вся в systemd

06.09.2014 15:18 #392056
AntiduPb написал:
Это что-то с systemd походу.
P.S. А обязательно CentOS 7? 6.5 не пойдет?

Да вот от балды захотелось поюзать 7, инновации "жи".

06.09.2014 15:19 #392057

[console]# yum install iptables-services[/console]

06.09.2014 15:20 · отредактировано #392058
drBatty написал:
[quote=Zed]Где собственно сам Iptables? Не могу дополнительные порты открыть или вообще выключить iptables

Где? ЕМНИП как обычно в /sbin/ или /usr/sbin/
а порты наверное и так все открыты, там по дефолту всё открыто.

И да, нет такого сервиса как iptables. Точнее, iptables это часть ядра, а команда service iptables лишь настраивает подсистему ядра.

Что-бы узнать состояние, наберите от рута
[console]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination [/console]
такой вывод говорит о том, что iptables "выключена", точнее работает в полностью прозрачном режиме.[/quote]
Как это нет?
В 6.5 есть.

06.09.2014 15:22 #392060
AntiduPb написал:
[console]# yum install iptables-services[/console]

То, что нужно - спасибо!

06.09.2014 15:23 #392061

AntiduPb, что за дурная привычка бросаться скринами? На которых к тому же написано, что service всё равно редиректит в systemctl, которая чего-то там не находит (Леннарт style programming, написать что не нашла, не написать ЧЕГО собственно хотела. Г-но кодер, такой г-нокодер…) Но тут понятно, не находит скорее всего конфига с правилами iptables. Ну и что с того?

06.09.2014 15:34 · отредактировано #392063

drBatty, Беру свои скрины обратно :)
И да, я тоже не поклонник systemd.

Войдите или зарегистрируйтесь, чтобы ответить.