完整的 iptables 启动脚本介绍
1. 脚本概述
这里有两个使用 iptables 配置 netfilter 的脚本,分别用于 DMZ 服务器和保护它的防火墙。假设采用简单的内部 - DMZ - 外部架构。这两个脚本仅作为开发自己防火墙规则的模型,切勿盲目应用到系统中。脚本可在 http://examples.oreilly.com/linuxss2/ 在线获取。
2. 第一个脚本:堡垒主机 Woofgang 的 iptables 脚本
2.1 脚本基本信息
此脚本用于运行 FTP 和 HTTP 服务的堡垒主机 Woofgang。以下是脚本的部分代码及说明:
#! /bin/sh
# init.d/localfw
#
# System startup script for local packet filters on a bastion server
# in a DMZ (NOT for an actual firewall)
#
# Functionally the same as Example 3-10, but with SuSE-isms restored and
# with many more comments.
#
# Structurally based on SuSE 7.1's /etc/init.d/skeleton, by Kurt Garloff
#
# The following 9 lines ar
超级会员免费看
订阅专栏 解锁全文
3920

被折叠的 条评论
为什么被折叠?



