The default location of iptables rules.

Support for security such as Firewalls and securing linux
Post Reply
hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

The default location of iptables rules.

Post by hack3rcon » 2019/11/02 16:22:24

Hello,
A server configured by another person. I did "iptables -L" and it showed me some iptables rules, how can I find the file that these rules saved in it?

Thanks.

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

Re: The default location of iptables rules.

Post by TrevorH » 2019/11/02 16:34:06

On CentSO 6 and 7, if using the standard scripts, then in /etc/sysconfig/iptables. If not there then they implemented their own version of it and you'll have to work out how.
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

hack3rcon
Posts: 757
Joined: 2014/11/24 11:04:37

Re: The default location of iptables rules.

Post by hack3rcon » 2019/11/02 16:48:02

TrevorH wrote:
2019/11/02 16:34:06
On CentSO 6 and 7, if using the standard scripts, then in /etc/sysconfig/iptables. If not there then they implemented their own version of it and you'll have to work out how.
If they implemented their own version then what locations I must examine and which commands can help me?

Whoever
Posts: 1357
Joined: 2013/09/06 03:12:10

Re: The default location of iptables rules.

Post by Whoever » 2019/11/03 04:51:57

Start by assuming that they used the standard location, which TrevorH kindly provided, and see if that appears to be correct.

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

Re: The default location of iptables rules.

Post by TrevorH » 2019/11/03 15:02:22

Because if they wrote their own then you are the only person that can find out what they did...
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