In the effort to lock down a new Centos box I am building I am installing iptables. I would like to be able to put this in a script so I can do this to other boxes but I am getting some odd errors and the roll back requires a reboot? Installing with
yum install iptables
which works fine, but before reboot:
[root@ip-10-0-0-132 ~]# systemctl start iptables
Failed to issue method call: Unit iptables.service failed to load: No such file or directory.
[root@ip-10-0-0-132 ~]# systemctl enable iptables
Failed to issue method call: Access denied
[root@ip-10-0-0-132 ~]#
and after
[root@ip-10-0-0-132 ~]# systemctl enable iptables
ln -s '/usr/lib/systemd/system/iptables.service' '/etc/systemd/system/basic.target.wants/iptables.service'
[root@ip-10-0-0-132 ~]# systemctl start iptables
[root@ip-10-0-0-132 ~]#
I am new to systemd and if this is completely trivial please point me to a man page/guide/wiki so I can research this. I just haven't found anything obvious as yet.