Hello fellow CentOS users,
on a freshly installed 7.2 machine and after reading
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/htm...
I try to enable iptables with following commands:
# cat /etc/centos-release CentOS Linux release 7.2.1511 (Core)
# rpm -qa | grep iptables iptables-1.4.21-16.el7.x86_64
# sudo systemctl list-units --type service --all | grep iptables ● iptables.service not-found inactive dead iptables.service
# sudo systemctl enable iptables.service Failed to execute operation: No such file or directory
What missing file is meant here please?
Thank you Alex
By default, Centos 7 uses firewalld.
Eero
2016-05-31 15:57 GMT+03:00 Alexander Farber alexander.farber@gmail.com:
Hello fellow CentOS users,
on a freshly installed 7.2 machine and after reading
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/htm...
I try to enable iptables with following commands:
# cat /etc/centos-release CentOS Linux release 7.2.1511 (Core)
# rpm -qa | grep iptables iptables-1.4.21-16.el7.x86_64
# sudo systemctl list-units --type service --all | grep iptables ● iptables.service not-found inactive dead iptables.service
# sudo systemctl enable iptables.service Failed to execute operation: No such file or directory
What missing file is meant here please?
Thank you Alex _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
On Tue, May 31, 2016 at 9:57 AM, Alexander Farber < alexander.farber@gmail.com> wrote:
Hello fellow CentOS users,
on a freshly installed 7.2 machine and after reading
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/htm...
I try to enable iptables with following commands:
# cat /etc/centos-release CentOS Linux release 7.2.1511 (Core)
# rpm -qa | grep iptables iptables-1.4.21-16.el7.x86_64
you need iptables-services rpm (and disable/remove firewalld)
Thank you, I have put my firewall rules into /etc/sysconfig/iptables:
*filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT ACCEPT [294:35064] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p icmp -m icmp --icmp-type any -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp -m multiport --dports 25,80,443,8080 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -m limit --limit 2/min --limit-burst 1 -j ACCEPT COMMIT Then issued the commands (there was no firewalld installed):
# yum install iptables-services # systemctl enable iptables # systemctl start iptables
And it seems to work well now
Regards Alex
On Tue, May 31, 2016 at 3:29 PM, Marcelo Roccasalva < marcelo-centos@irrigacion.gov.ar> wrote:
On Tue, May 31, 2016 at 9:57 AM, Alexander Farber < alexander.farber@gmail.com> wrote:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/htm...
I try to enable iptables with following commands:
# cat /etc/centos-release CentOS Linux release 7.2.1511 (Core)
# rpm -qa | grep iptables iptables-1.4.21-16.el7.x86_64
you need iptables-services rpm (and disable/remove firewalld)