EMOS1.3安装后的相关安全设置
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-05-15
ostfix$(date %Y%m%d).sql >> $LogFile 2>&1 echo "[$NewFile]Backup Success!" >> $LogFile rm -rf $DumpFile fi ###################################################################### # backup mail''s user directories and files # ###################################################################### 拥有帝国一切,皆有可能。欢迎访问phome.net MailFileBk=$Mail_bk_dir/mail$(date %Y%m%d).tgz OldMailFileBk=$Mail_bk_dir/mail$(date %Y%m%d --date=''14 days ago'').tgz if [ -f $OldMailFileBk ] then rm -rf $OldMailFileBk fi if [ -f $MailFileBk ] then echo "[$MailFileBk]The Backup File is exists,Can''t Backup!" >> $LogFile else cd /home tar czf $MailFileBk domains >> $LogFile 2>&1 fi echo "-------------------------------------------" >> $LogFile #*********************************************************************************************************8 #4、内核优化脚本(/usr/local/bin/kernel_optimize) chmod x /usr/local/bin/kernel_optimize ----添加执行权限 echo "/usr/local/bin/kernel_optimize" >> /etc/rc.local --开机自动运行 #!/bin/bash #kernel optimize optimize ,create by 2008-10-07 #enable broadcast echo protection echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts #deny ping echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all #disble source routed packets #for f in /proc/sys/net/ipv4/conf/*/accept_source_rout; do # echo 0 > $f #done #enable tcp syn cookie protection echo 1 > /proc/sys/net/ipv4/tcp_syncookies #disable icmp redirect acceptance for f in /proc/sys/net/ipv4/conf/*/accept_redirects; do echo 0 > $f done #don''t send redirect messages for f in /proc/sys/net/ipv4/conf/*/send_redirects; do echo 0 > $f done #drop spoofed packets for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 1 > $f done #log packets with impossible addresses for f in /proc/sys/net/ipv4/conf/*/log_martians; do echo 1 > $f done #******************************************************************************************************** 拥有帝国一切,皆有可能。欢迎访问phome.net #5、防火墙设置脚本(/usr/local/bin/firewall) chmod x /usr/local/bin/firewall ---添加执行权限 echo "/usr/local/bin/firewall " >> /etc/rc.local ---开机自动运行 #!/bin/bash #this is a common firewall created by 2008-10-7 #define some variable IPT=/sbin/iptables CONNECTION_TRACKING="1" INTERNET="eth0" CLASS_A="10.0.0.0/8" CLASS_B="172.16.0.0/12" CLASS_C="192.168.0.0/16" CLASS_D_MULTICAST="224.0.0.0/4" CLASS_E_RESERVED_NET="240.0.0.0/5" BROADCAST_SRC="0.0.0.0" BROADCAST_DEST="255.255.255.255" IPADDR=220. 94.58.245 LOOPBACK_INTERFACE="lo" #Remove any existing rules $IPT -F $IPT -X #setting default firewall policy $IPT --policy OUTPUT ACCEPT $IPT --policy FORWARD DROP $IPT -P INPUT DROP #stop firewall if [ "$1" = "stop" ] then echo "Filewall completely stopped!no firewall running!" exit 0 fi #setting for loopback interface $IPT -A INPUT -i lo -j ACCEPT $IPT -A OUTPUT -o lo -j ACCEPT # S |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: linux实用方法下一篇: linux服务之samba
关于EMOS1.3安装后的相关安全设置的所有评论