Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iptables where are the rules defined

Status
Not open for further replies.

keak

Programmer
Sep 12, 2005
247
CA
Hi there,
I am new to firewall in iptables.
I am currently working on a box that have iptable rules defined.

iptables -L

shows me a list of rules, but I can't seem to fine where these rules are defined in.

I did a locate iptables but most of the file that came up are either doc files or executable files?

Is there a text file where i define the rules of iptables?

What happens if we define all the rules and then do a reboot, do the rules have to be re-entered again?


Many thanks :)
 
On my fedora machine, it is saved in /etc/sysconfig/iptables. You will lose your setting if you reboot without first saving. Use iptables-save > /etc/sysconfig/iptables or replace /etc/sysconfig/iptables with whatever location your distro of choice stores it at.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
The server is a debian but I can't seem to find a sysconfig folder ...

Code:
updatedb
locate sysconfig | grep iptables

returns an empty field ...

Does debian store's its iptables rules by default in another place?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top