Networking Forums

Networking Forums > Computer Networking > Linux Networking > getting started with iptables

Reply
Thread Tools Display Modes

getting started with iptables

 
 
Peter
Guest
Posts: n/a

 
      07-24-2006, 10:48 PM
Hi, I understand the basics of the iptables command but I am having
trouble grasping how the various "scripts" go together. I have a
CentOS (Red Hat) box set up and there is an init script
/etc/init.d/iptables. There is also a support script
/etc/sysconfig/iptables-config. I understand also that 'service
iptables save' creates a ruleset file of my current ruleset inside
/etc/sysconfig/iptables. My question is therefore "Where do I place my
main (and documented) ruleset file?". Where can I get a sample/starter
ruleset file? Are there more scripts/files I should be aware of?

Peter

 
Reply With Quote
 
 
 
 
Thorsten Scherf
Guest
Posts: n/a

 
      07-26-2006, 05:38 AM
On 2006-07-24, Peter <(E-Mail Removed)> wrote:
[...]
> /etc/sysconfig/iptables. My question is therefore "Where do I place my
> main (and documented) ruleset file?". Where can I get a sample/starter
> ruleset file? Are there more scripts/files I should be aware of?


Read your iptables init script again. This is the important part:

#!/bin/sh
#
# iptables Start iptables firewall
#
# chkconfig: 2345 08 92
# description: Starts, stops and saves iptables firewall
#
# config: /etc/sysconfig/iptables
# config: /etc/sysconfig/iptables-config

# Source function library.
.. /etc/init.d/functions

IPTABLES=iptables
IPTABLES_DATA=/etc/sysconfig/$IPTABLES
IPTABLES_CONFIG=/etc/sysconfig/${IPTABLES}-config
IPV=${IPTABLES%tables} # ip for ipv4 | ip6 for ipv6
PROC_IPTABLES_NAMES=/proc/net/${IPV}_tables_names
VAR_SUBSYS_IPTABLES=/var/lock/subsys/$IPTABLES

Greetings,
Thorsten

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Started With BGP Thomas Linux Networking 3 01-28-2009 08:46 PM
Just getting started........ Mike W. Home Networking 16 04-29-2005 12:02 PM
Getting started with 802.1Q Brendon Caligari Linux Networking 0 12-21-2004 10:09 AM
Can't Even Get Started Another Rob Broadband Hardware 1 02-29-2004 08:57 AM
Verizon DSL how to started ? Net Resident Linux Networking 2 12-29-2003 03:01 AM



1 2 3 4 5 6 7 8 9 10 11