博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
iptables 设置
阅读量:4201 次
发布时间:2019-05-26

本文共 1163 字,大约阅读时间需要 3 分钟。

1.设置开机启动chkconfig iptables on2.启动iptables/etc/init.d/iptables start3.查看开启的端口/etc/init.d/iptables status可以查看到那些端口已经开启iptables4.某个端口不安全,我们需要关闭/sbin/iptables -I INPUT -p tcp --dport 9889 -j DROP5.开启某个端口/sbin/iptables -I INPUT -p tcp --dport 8011 -j ACCEPT 6.开启之后一定要保存。不然下次还是需要设置   /etc/rc.d/init.d/iptables save  7. linux下清空iptables规则具体方法如下:    iptables -t nat -F    iptables -t nat -X    iptables -t nat -P PREROUTING ACCEPT    iptables -t nat -P POSTROUTING ACCEPT    iptables -t nat -P OUTPUT ACCEPT    iptables -t mangle -F    iptables -t mangle -X    iptables -t mangle -P PREROUTING ACCEPT    iptables -t mangle -P INPUT ACCEPT    iptables -t mangle -P FORWARD ACCEPT    iptables -t mangle -P OUTPUT ACCEPT    iptables -t mangle -P POSTROUTING ACCEPT    iptables -F    iptables -X    iptables -P FORWARD ACCEPT    iptables -P INPUT ACCEPT    iptables -P OUTPUT ACCEPT    iptables -t raw -F    iptables -t raw -X    iptables -t raw -P PREROUTING ACCEPT    iptables -t raw -P OUTPUT ACCEPT8 远程不要使用 关闭所有的 INPUT FORWARD OUTPUT 只对某些端口开放。iptables -P INPUT DROPiptables -P FORWARD DROPiptables -P OUTPUT DROP9 开启80端口/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT

转载地址:http://codli.baihongyu.com/

你可能感兴趣的文章
利用 STAF 实现程序更新包的自动部署测试
查看>>
软件安全性测试转载自小龙虾博客
查看>>
周末参加“北京干部管理职业技术学院”关于高职课程改革的专家讨论会
查看>>
软件测试框架介绍
查看>>
软件自动化测试框架的发展
查看>>
实现haproxy+LNMT负载均衡架构
查看>>
TensorFlow和keras的前世今生以及keras和tf.keras的对比
查看>>
Keras(一)分类模型实战
查看>>
Keras(二)回归模型实战
查看>>
Keras(三)实现深度神经网络
查看>>
sigmoid函数求导、求极值(史上最详细)
查看>>
Keras(四)实现批标准化、激活函数、dropout
查看>>
Keras(五)wide_deep模型
查看>>
Keras(六)keras模型封装转化为sklearn模型、使用超参数搜索
查看>>
排坑:TypeError: handle_get_file_code() got an unexpected keyword argument ‘save_all‘
查看>>
C++ explict
查看>>
const
查看>>
new & delete
查看>>
《Windows程序设计》第4章
查看>>
VC项目文件说明
查看>>