Page 1 of 1

The default location of iptables rules.

Posted: 2019/11/02 16:22:24
by hack3rcon
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.

Re: The default location of iptables rules.

Posted: 2019/11/02 16:34:06
by TrevorH
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.

Re: The default location of iptables rules.

Posted: 2019/11/02 16:48:02
by hack3rcon
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?

Re: The default location of iptables rules.

Posted: 2019/11/03 04:51:57
by Whoever
Start by assuming that they used the standard location, which TrevorH kindly provided, and see if that appears to be correct.

Re: The default location of iptables rules.

Posted: 2019/11/03 15:02:22
by TrevorH
Because if they wrote their own then you are the only person that can find out what they did...