D
D
David K2019-04-07 06:46:31
linux
David K, 2019-04-07 06:46:31

How to check if iptables starts at system startup?

just explain what needs to be done to fix the error at the bottom I will publish the error:
chkconfig --list iptables
Attention! Only SysV services are shown below (no systemd services).
SysV configuration data can be overridden
by native systemd configuration.
To see a complete list of systemd services run: systemctl list-unit-files
To get a list of services for a specific systemd target run:
systemctl list-dependencies [target]
error reading iptables service information: No such file or directory

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
hint000, 2019-04-07
@hint000

iptables is not a service and the question "is iptables started at system startup" is meaningless. Similarly, you can ask "How to check that when the car engine starts, the wheels start, the air filter starts?"
iptables is part of the Linux kernel, this part may be missing if the kernel is compiled this way (for example, for gadgets or for industrial computers), but in regular Linux (for PCs, for servers) it is almost always there.
The correct question would be: "how to see the iptables rules?" By default, iptables is there, but "empty", without rules. View -

sudo iptables -L
sudo iptables -L -t nat

D
Dmitry, 2019-04-07
@q2digger

distribution of CentOS 7?
if yes, then there is already firewalld , it is controlled by
If you want to replace it with the "classic" iptables + start wrapper, you will have to install the iptables-services package, and disable firewalld.

S
sergey, 2019-04-09
kuzmin @sergueik

for this you need to install
and without it, just
sudo iptables -Lfor the list of rules and already look,
for example. can all without looking accept

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question