linux iptables使用注意
来源:互联网 发布:mysql 时间虚表 编辑:程序博客网 时间:2024/06/08 09:35
iptables里的规则,优先级是从上至下的,遇到符合条件的规则,通过后,就会直接解析生效,不会解析后面的规则。
所以要注意,比如想指定端口号,开放给指定的ip访问,ACCEPT要在drop的前面,不然是不会有正确效果的,类似以下:
iptables -I INPUT -p tcp --dport 9300 -j DROP
iptables -I INPUT -s 10.132.39.116 -p tcp --dport 9300 -j ACCEPT
ps:这样执行后,ACCEPT会在drop的前面
另外就是添加规则后,怎么让新规则生效的问题,之前一直以为修改好后,直接service iptables restart就会生效,但其实有区别的。
如果用iptables命令直接添加规则,那么添加后,直接执行service iptables save就可以了。
如果我们直接编辑/etc/sysconfig/iptables文件,则需要执行service iptables restart才生效(不需要执行save动作)
0 0
- linux iptables使用注意
- Linux 学习使用 iptables
- iptables(linux防火墙) 使用
- Linux之iptables使用
- Linux下使用iptables
- linux iptables 防火墙使用
- iptables使用中几点注意的问题
- iptables 使用时注意的地方
- zookeeper使用和原理探究 (注意linux下防火墙导致启动失败的坑,使用service iptables stop 关闭防火墙 使用service iptables status确认)
- linux 下iptables配置使用
- 使用iptables保障Linux服务器
- 《linux iptables使用入门》(转载)
- linux iptables命令使用詳細記錄
- linux iptables防火墙使用模板
- 【提醒】使用 iptables 时,特别注意 规则的顺序
- Linux/CentOS 使用 iptables封ip段
- linux中使用Iptables预防黑客攻击
- linux下防火墙iptables原理及使用
- 树莓派 Raspberry Pi 使用简介
- 解决rpm conflicts with file from package的两个方法
- Analyzing SAP Extended Memory, SAP Heap Memory, and SAP Roll Memory
- 【数据库系统概论】-并发控制
- LeetCode: Wildcard Matching
- linux iptables使用注意
- QQ第三方登陆及同步内容到腾讯微博,腾讯空间,朋友网
- 面试IT业界顶尖企业所应该知道的10道题(1)
- Unity3D中Resources动态加载NGUI图片的方法!!!
- Caffe for Windows配置和测试【流程】
- 守护进程的设计与实现
- 微信在中国“抢了微博的风头”
- [前端] sublime text3 新建片段
- 《c陷阱与缺陷》笔记--函数指针