Iptables

Issues related to configuring your network
Post Reply
kkuppusa
Posts: 3
Joined: 2020/12/24 16:16:13

Iptables

Post by kkuppusa » 2020/12/24 21:20:15

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

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Iptables

Post by jlehtone » 2020/12/25 11:29:43

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.

kkuppusa
Posts: 3
Joined: 2020/12/24 16:16:13

Re: Iptables

Post by kkuppusa » 2020/12/28 13:53:51

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 ?

kkuppusa
Posts: 3
Joined: 2020/12/24 16:16:13

Re: Iptables

Post by kkuppusa » 2020/12/28 13:54:43

Existing configuration are still there what I have added is not taking effect post restarting

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Iptables

Post by TrevorH » 2020/12/28 15:14:12

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)
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply