A
A
Alexander Melikhov2017-09-08 16:49:57
linux
Alexander Melikhov, 2017-09-08 16:49:57

Problem with iptables in centos, how to add a rule to accept established connections?

When trying to add the following rule to iptables

iptables -I INPUT 1 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

the error gets out
iptables: No chain/target/match by that name.
All Google rummaged already. They write that maybe the conntrack module is not loaded. Checked by a command
iptables -m conntrack -h
shows a help on this module.
hostnamectl output
Icon name: computer-container
           Chassis: container
        Machine ID: ad17ba5152474b2eb017170797500ff5
           Boot ID: 9709c42609a24e8daccb6e91e76c41d5
    Virtualization: openvz
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 2.6.32-042stab120.11
      Architecture: x86-64

What could be causing this error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wexter, 2017-09-08
@amelihovv

You have a virtual machine on OpenVZ, it does not allow you to work with this module
https://askubuntu.com/questions/689927/enabling-co...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question