You get a bonus - 1 coin for daily activity. Now you have 1 coin

Where Is the IPTABLES Configuration File Located (Default Path)?

Practice



By default, Linux OS systems have a firewall called IPTABLES. It can even be configured right after installation to block almost everything (as happens, for example, right after installing CentOS).

That would all be fine, but then the urge comes up to tweak a couple of rules in this firewall. Right away the question arises - where is the default file located that IPTABLES reads its rules from?

So,


For Linux Debian:

By default the file isn't created, but if rules are already present - look at this path:
/etc/network/if-pre-up.d/iptables

at this path there should be a bash file with a directive telling it where to pull instructions from (or the rules themselves may be written directly in it).


For Linux CentOS / RedHat:

/etc/sysconfig/iptables

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "LINUX operating system"

Terms: LINUX operating system