Debian 防火墙 打开 关闭
Debian原来用的是UFW防火墙,之前没接触过这种类型防火墙,懵逼了半天,这里记录一下简单的使用规则,后期在使用过程中慢慢完善UFW防火墙的使用操作方法;
查看防火墙现有规则:
ufw status
开启/关闭防火墙:
ufw enable //开启
ufw disable //关闭
开启指定tcp或者udp端口:
ufw allow 22/tcp
同时开启tcp与udp端口:
ufw allow 445
删除53端口:
ufw delete allow 53
拒绝指定tcp或者udp端口:
allow/deny 20/tcp
allow/deny 20/udp
突出显示的输出表示网络接口名称。 它们通常被命名为eth0或enp3s2 。
因此,如果您的服务器具有名为eth0的公共网络接口,则可以使用以下命令允许HTTP流量(端口80 ):
sudo ufw allow in on eth0 to any port 80
这样做将允许您的服务器从公共互联网接收HTTP请求。
或者,如果您希望MySQL数据库服务器(端口3306 )监听专用网络接口eth1上的连接,例如,您可以使用此命令:
sudo ufw allow in on eth1 to any port 3306
这将允许专用网络上的其他服务器连接到MySQL数据库。
Debian 防火墙 打开 关闭的更多相关文章
- ubuntu 防火墙打开关闭
1.查看防火墙状态 sudo ufw status 2.打开防火墙 sudo ufw enable 3.关闭防火墙 sudo ufw disable
- CentOS7使用firewalld打开关闭防火墙与端口(转载)
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...
- 关于学习CentOS7使用firewalld打开关闭防火墙和端口
1.firewalld简介 firewalld是centos7的一大特点,主要有两个优点:一是支持动态更新,不需要重启服务:二就是加入了防火墙的“zone”概念. firewalld有图形界面和工具界 ...
- CentOS7使用httpd apache 和firewalld打开关闭防火墙与端口
Centos7 使用systemctl 工具操作命令 systemctl 是Centos7的服务管理工具中的主要工具 ,它融合之前service和chkconfig的功能于一体 一.httpd的设置 ...
- CentOS7使用firewalld打开关闭防火墙与端口(转)
CentOS7使用firewalld打开关闭防火墙与端口 1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop ...
- centos6和centos7防火墙的关闭
CentOS6.5查看防火墙的状态: [zh@localhost ~]$service iptable status 显示结果: [zh@localhost ~]$service iptable st ...
- CentOS 6和CentOS 7防火墙的关闭
CentOS6.5查看防火墙的状态: 1 [linuxidc@localhost ~]$service iptable status 显示结果: 1 2 3 4 5 [linuxidc@localho ...
- [转]CentOS 6和CentOS 7防火墙的关闭
CentOS6.5查看防火墙的状态: 1 [linuxidc@localhost ~]$service iptable status 显示结果: 1 2 3 4 5 [linuxidc@local ...
- lunix如何查看防火墙是否关闭和关闭开启防火墙命令
查看防火墙是否关闭的命令如下: 1.通过 /etc/init.d/iptables status 或者 service iptables status命令 2.通过 iptables -L命令 查看 ...
随机推荐
- PHP算法[转]
这里是用PHP写的几个基础算法,算法的重要性貌似对于PHP程序员不怎么重要,其实是非常重 要的,经典名句:算法+数据结构=程序.作为一名真正的高级PHP程序员,我认为应该熟悉C,如果你想成为真正的程序 ...
- linux学习-系统监控工具
系统监控工具 come from:https://blog.csdn.net/free050463/article/details/82842273top.free.vmstat.iostat.pma ...
- 【转载】Spring bean 中 constructor-arg属性
转载地址:https://blog.csdn.net/qq_27292113/article/details/78063696 方便以后查阅
- springboot2.0+websocket集成【群发消息+单对单】(二)
https://blog.csdn.net/qq_21019419/article/details/82804921 版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上 ...
- Beta-星期五
所属课程 https://edu.cnblogs.com/campus/xnsy/SoftwareEngineeringClass 作业要求 https://edu.cnblogs.com/camp ...
- Splay平衡树入门小结
学习到这部分算是数据结构比较难的部分了,平衡树不好理解代码量大,但在某些情况下确实是不可替代的,所以还是非学不可. 建议先学Treap之后在学Splay,因为其实Splay有不少操作和Treap差不多 ...
- LeetCode(力扣)——Search in Rotated Sorted Array2 搜索旋转排序数组 python实现
题目描述: python实现 Search in Rotated Sorted Array2 搜索旋转排序数组 中文: 假设按照升序排序的数组在预先未知的某个点上进行了旋转. ( 例如,数组 [0 ...
- JSP项目中使用ueditor(百度编辑器)
1. 从http://ueditor.baidu.com下载JSP版本的ueditor,注意GBK和UTF-8两种版本. 2. 在Web Project项目的WebRoot目录下新增thirdpart ...
- 【串线篇】Mybatis之缓存原理
所谓二级缓存是名称空间级别的缓存,什么意思呢? TeacherDao.xml首行 <mapper namespace="com.atguigu.dao.TeacherDao" ...
- BZOJ 2565 最长回文串
传送门 回文自动机! 正着跑一遍 记录以每个点作为回文子串的右端点的最大长度 倒过来跑一遍 记录每个点作为左端点的最大长度 求个和就好啦 附代码. #include<cstdio> #in ...