Page 1 of 1

Iptables

Posted: 2020/12/24 21:20:15
by kkuppusa
Hi all

I have appliance running on cent is 7 and we are trying to achieve the ipv4 iptables inserting the rule for sshport for certain IP address

When I insert the rule and save it in the /etc/sysconfig/iptables
Post stop and start the iptables services are vanished

I have tried to edit directly also using vi cmd but no luck
Let me know if any guidelines for that

Re: Iptables

Posted: 2020/12/25 11:29:43
by jlehtone
Firewall rules are by default managed by firewalld.service. Is it running?
A mutually exclusive alternative is iptables.service

It is not entirely clear how you have done your configuration.

Re: Iptables

Posted: 2020/12/28 13:53:51
by kkuppusa
Basically I edited in the path /etc/sysconfig/iptable a using vi Cmc.
Post restarting the services for iptables, could see the configuration which I added in the iptables. So firewalls.service is not allowing to add the configuration?
How to proceed further ?

Re: Iptables

Posted: 2020/12/28 13:54:43
by kkuppusa
Existing configuration are still there what I have added is not taking effect post restarting

Re: Iptables

Posted: 2020/12/28 15:14:12
by TrevorH
Is firewalld running? If so then you cannot amend your rules that way. If that is the case then you either need to work out how to disable firewalld and use iptables directly or you need to use the firewalld utilities to amend the rules. You cannot mix and match firewall and iptables commands (unless they are readonly and do not modify the rules)