Linux Security Cookbook [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Security Cookbook [Electronic resources] - نسخه متنی

Daniel J. Barrett, Robert G. Byrnes, Richard Silverman

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










Recipe 2.18 Inserting Firewall Rules



2.18.1 Problem


Rather
than appending a rule to a chain, you want to insert or replace one
elsewhere in the chain.


2.18.2 Solution



Instead of the
-A option, use -I to insert or
-R to replace. You'll need to
know the numeric position, within the existing rules, of the new
rule. For instance, to insert a new rule in the fourth position in
the chain:

# iptables -I chain 4 ...specification...
# ipchains -I chain 4 ...specification...

To replace the second rule in a chain:

# iptables -R chain 2 ...specification...
# ipchains -R chain 2 ...specification...


2.18.3 Discussion


When you insert a rule at position N in a chain, the old rule N
becomes rule N+1, rule N+1 becomes rule N+2, and so on. To see the
rules in a chain in order, so you can determine the right numeric
offset, list the chain with -L. [Recipe 2.16]


2.18.4 See Also


iptables(8), ipchains(8).

/ 247