59、完整的 iptables 启动脚本介绍

完整的 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值