当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: DMZ部分尚不完善,其中难免有疏漏,希望大家跟我一块改进,使他功能越来越强大,使用时请将firewall-devcopy到/etc/rc.d/init.d将firewall.confcopy/etc/下,你只需修改firewall.conf文件就可以了。
 

 

    摘要: 系统准备:一个运转正常的linux(这个大家都有)硬件要求:至少一块网卡,宽带设备已经申请完毕,同时已经开通adsl的说明:目前市场上大概有几种adsl设备,他们工作的方式有一些细微的差别,在此先与大家分享一下,就我所遇到的。 1。就是通过虚拟拨号来完成上网的这一过程,也就是利用pppoe设备来进行虚拟拨号的 2。叫作全向猫,就是一种加电后自动的进行拨号的工作,然后留给我们的接口是rj45,......
 ·apache完全安装指南    »显示摘要«
    摘要: 摘要:本文讨论如何安装支持mod_perl、mod_ssl及php的apache web服务器,并安装webalizer实现对web访进行日志分析。手把手引导初学者编辑一个安全、功能完备的web服务器系统。所需软件apache_1.3.20.tar.gz 主页: http://www.apache.org本地下载地址mod_perl-1.26.tar.gz 主页: http://perl.a......


全都是外国人写的防火墙脚本,我也来写一个,希望大家跟我一块做

dmz部分尚不完善,其中难免有疏漏,希望大家跟我一块改进,使他功能越来越强大,使用时请将firewall-dev copy 到/etc/rc.d/init.d将  firewall.conf copy /etc/下,你只需修改firewall.conf文件就可以了.可以用firewall-dev start|stop起动与关闭防火墙,功能增加中,如你有任何改动请发一份给我,arlenecc@263.net 【程序编程相关:Linux新技术对象存储文件系统

【推荐阅读:Linux基础知识99问(五)

【扩展信息:Linux环境下使用JFS文件系统

本着gpl的原则希望有志之士跟我一块完善它,如有改动请通知我!!!!

firewall-dev

#!/bin/bash

#          this is a firewall script with the function of  stateful and 

#          ip filter,  you can change it to meet you need,in a words:

#          uplink means the output interface ,router means if you neet it

#          to be a router or not,nat means if you are useing a dynamic ip

#          address

#          if you do ,then you can change it to "dynamic",interfaces means

#          all the interface in you server ,services means all the services 

#          you server providing ,enjoy it !!!   ----- write by arlenecc

#

##############################################################################

#                                                                            #

#    copyright (c) 2002 arlenecc          arlenecc@netease.com               #

#    all rights reserved                                                     #

#                                                                            #

##############################################################################

#

#          now begins the firewall 

   

  uplink=`less /root/firewall.conf | grep "uplink" | cut -d = -f 2 `

  

  upip=`less /root/firewall.conf | grep "upip" | cut -d = -f 2`

    

  router=`less /root/firewall.conf | grep "router" | cut -d = -f 2`

  

  nat=`less /root/firewall.conf | grep "nat" | cut -d = -f 2`

   

  interfaces=`less /root/firewall.conf | grep "interfaces" | cut -d = -f 2`

    

  services=`less /root/firewall.conf | grep "services" | cut -d = -f 2`

    

  denyports=`less /root/firewall.conf | grep "denyports" | cut -d = -f 2`

   

  denyudpport=`less /root/firewall.conf | grep "denyudpport" | cut -d = -f 2`

  

  lan_if=`less /root/firewall.conf | grep "lan_if" | cut -d = -f 2`

   

  lan_net=`less /root/firewall.conf | grep "lan_net" | cut -d = -f 2`

   

  dmz_net=`less /root/firewall.conf | grep "dmz_net" | cut -d = -f 2`

  

  dmz_if=`less /root/firewall.conf | grep "dmz_if" | cut -d = -f 2`

  

   dmz_tcp_port=`less /root/firewall.conf | grep "dmz_tcp_port" | cut -d = -f 2`

   

   dmz_udp_port=`less /root/firewall.conf | grep "dmz_udp_port" | cut -d = -f 2`

   

   web_ip=`less /root/firewall.conf | grep "web_ip" | cut -d = -f 2`

   

   ftp_ip=`less /root/firewall.conf | grep "ftp_ip" | cut -d = -f 2`

   

   h323_port=`less /root/firewall.conf | grep "h323_port" | cut -d = -f 2`

  

   h323=`less /root/firewall.conf | grep "h323" | cut -d = -f 2`

    

   

    if [ "$1" = "start" ]

    then 

         echo "starting firewall......"

echo "now prepareing kernel for use,please wait....."

   # if [ -e /proc/sys/net/ipv4/ip_forward ]

   #

   #    then

   #       echo 1 >/proc/sys/net/ipv4/ip_forward

   #    fi

   if [ "$nat" = " dynamic " ]

       then 

           echo "enable dynamic ip support...." 

           echo 1 > /proc/sys/net/ipv4/ip_dynaddr

          echo "    ok !!!!"

   fi

   if [ -e /proc/sys/net/ipv4/tcp_syncookies ]

       then

             echo "enable the syn cook flood protection"

             echo 1 > /proc/sys/net/ipv4/tcp_syncookies 

             echo "     ok !!!!"

   fi

   if [ -e /proc/sys/net/ipv4/ip_conntrack_max ]


...   下一页
    摘要: 小弟学了 sendmail, 现在能配出了不安全的 mail 了 ^-^ 不过发现所有的用户都是real用户,现在想 如何需要配的是提供免费的email 服务那样 像 sina 那样的话,手动是一定不行了,请教各位他们是如何实现的?有没有教程? sunny0236 回复于:2002-08-10 18:04:37 sendmail功能达不到。要是象sina那样的你就要用......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE