共 41 篇文章 |
|
机房有机器中毒,发arp包,通过arpspoof虽然可以解决,也可以找到中毒机器的mac地址,但在机房设备不足的情况下,很难查到mac地址对应的IP。然后我们可以通过一个循环,使用arping来对整个子网下面的机器发一个包,这样就可以在arp下面查看到相应的mac缓存,进而得到对应的IP地址。#arp -a 查找你中毒时网关的MAC地址,并记录下来在mac_table里... 阅460 转2 评0 公众公开 10-12-02 08:42 |
[root@mail ~]# cat /root/deny_100.sh #/bin/bash netstat -an| grep :80 | grep -v 127.0.0.1 |awk ''{ print $5 }'' | sort|awk -F: ''{print $1}'' | uniq -c | awk ''$1 >100'' >/root/black.txt for i in `awk ''{print $2}'' /root/black.txt` do COUN... 阅527 转2 评0 公众公开 10-12-02 08:41 |
#/bin/bashiptables -Fiptables -F -t natiptables -Xiptables -P INPUT DROPiptables -P OUTPUT DROPiptables -P FORWARD DROP.iptables -A OUTPUT -o lo -j ACCEPTiptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPTiptables -A OUTPUT -p tcp -m multiport --sport 80,22 -j ACCEPTiptables -A OUTPUT -p icmp --icmp-type... 阅1439 转6 评0 公众公开 10-12-02 08:39 |
4、使用iptables限制单个地址的并发连接数量:#iptables -t filter -A INPUT -p tcp --dport 80 --tcp-flags FIN,SYN,RST,ACK SYN -m connlimit --connlimit-above 10 --connlimit-mask 32 -j REJECT.5、使用iptables限制单个c类子网的并发链接数量:#iptables -t filter -A INPUT -p tcp --dport 80 --tcp-flags FIN,SYN,RST,ACK SYN -m connl... 阅3404 转23 评0 公众公开 10-01-06 11:05 |
制作:高进波 时间:2009-4-25 主题:使用iptables做端口转发访问ftp nat.#加载需要的模块 modprobe iptable_nat modprobe ip_conntrack_ftp modprobe ip_nat_ftp.#使用iptables转发 iptables -t nat -A POSTROUTING -d 目标ip -p tcp -dport 21 -j MASQUERADE iptables -t nat -A PREROUTING -d 本机ip -p tcp -dport 21 -j DNAT -to-dest 目... 阅3207 转19 评0 公众公开 09-11-26 11:56 |
1: iptables -A INPUT -p tcp -syn -j DROP.Finally, iptables -A INPUT -p tcp -syn -j DROP will drop all SYN flood packets.iptables -A port-scan -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j RETURNiptables -A port-scan -j DROP.iptables -A specific-rule-set -p tcp --syn -j syn-floodiptables -A specific-ru... 阅746 转10 评0 公众公开 09-11-06 17:47 |
学习使用 iptables - linux - 孙峰。iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPTiptables -A INPUT -p tcp -s 127.0.0.1/8 -d 0/0 --destination-port 20 --syn -j ACCEPTiptables -A INPUT -p tcp -s 127.0.0.1/8 -d 0/0 --destination-port 21 --syn -j ACCEPT.iptables -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT --syn ipt... 阅753 转7 评0 公众公开 09-08-22 11:52 |
--syn -m state --state NEW -j LOG_DROP至于需要进行 ACCEPT 处理的规则也如法炮制,先建立 LOG_ACCEPT 规则炼:iptables -N LOG_ACCEPTiptables -A LOG_ACCEPT -j LOG --log-tcp-options --log-ip-options --log-prefix '[IPTABLES ACCEPT] : 'iptables -A LOG_ACCEPT -j ACCEPT接着修改所有规则,例如:$IPTABLES -A allowed -p TCP... 阅74 转2 评0 公众公开 08-09-08 10:17 |
## WWW caching service:放在第3类iptables -t mangle -A PREROUTING -p tcp -m tcp --dport 8080 -j MARK --set-mark 3iptables -t mangle -A PREROUTING -p tcp -m tcp --dport 8080 -j RETURNiptables -t mangle -A PREROUTING -p tcp -m tcp --sport 8080 -j MARK --set-mark 8iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 80... 阅694 转4 评0 公众公开 08-09-08 10:14 |
# 以下三句限制各IP的上传带宽/sbin/tc class add dev $ODEV parent 20:1 classid 20:1$COUNTER cbq bandwidth 1Mbit rate $UPLOAD allot 1514 weight 4Kbit prio 5 maxburst 20 avpkt 1000 bounded/sbin/tc qdisc add dev $ODEV parent 20:1$COUNTER sfq quantum 1514b perturb 15/sbin/tc filter add dev $ODEV parent 20:0 protocol ip prio... 阅1707 转8 评0 公众公开 08-09-08 10:12 |