iptables rules location.

Kernels & Hardware, configuring network, installing services

iptables rules location.

Postby hack3rcon » 2019-11-03 06:30

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.
hack3rcon
 
Posts: 297
Joined: 2015-02-16 09:54

Re: iptables rules location.

Postby kedaha » 2019-11-03 08:01

Hello,
Most likely in /etc/
How about:
iptables.test.rules
iptables.up.rules
as configured here?
Or if iptables-persistent was used
# cat /etc/iptables/rules.v4
# cat /etc/iptables/rules.v6
Mate DE & OSSv4.
FreedomBox in Debian
ispmail
Debian Stable

Words, as is well known, are the great foes of reality. Joseph Conrad.
Kedaha's Conjecture
User avatar
kedaha
 
Posts: 3000
Joined: 2008-05-24 12:26

Re: iptables rules location.

Postby p.H » 2019-11-05 09:46

What do these rules look like ? It may give a hint about where they come from, notably if there are user defined chains.
Please consider using iptables-save instead of iptables -L to dump the ruleset.
p.H
 
Posts: 1151
Joined: 2017-09-17 07:12


Return to System configuration

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable