Chinaunix首页 | 论坛 | 博客
  • 博客访问: 78449
  • 博文数量: 46
  • 博客积分: 985
  • 博客等级: 准尉
  • 技术积分: 450
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-20 22:56
文章分类

全部博文(46)

文章存档

2011年(46)

我的朋友

分类: LINUX

2011-01-25 09:41:50

1 WWW用  仅开放80端口
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
2 DNS用  允许源为53 目的为1024-65535的UDP包
iptables -A INPUT -p udp --sport 53 --dport 1024:65535 -j ACCEPT
3 清除
modprobe ipt_MASQUERADE
modprobe ip_conntrack_ftp
modprobe ip_nat_ftp
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -X
4 禁止别人发起主动连接
iptables -A INPUT -m state --state NEW,INVALID -j DROP
5 指定MAC连接到服务器
iptables -A INPUT  -p tcp --dport 22 -m mac --mac-source MAC -j ACCEPT
6 限制别人PING
iptables -A INPUT -p icmp -m limit --limit 1/s --limit-burst 5 -j ACCEPT
iptables -A INPUT -p icmp -j DROP
7 只允许2个人telnet你
iptables -A INPUT -p tcp --dport 23 -m limit --limit-burst 2 -j ACCEPT
阅读(1054) | 评论(0) | 转发(0) |
0

上一篇:iptables mangle表笔记

下一篇:没有了

给主人留下些什么吧!~~