美文网首页
UFW 设置教程

UFW 设置教程

作者: 时见疏星 | 来源:发表于2020-01-08 21:18 被阅读0次

https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands

Service: Mail
Mail servers, such as Sendmail and Postfix, listen on a variety of ports depending on the protocols being used for mail delivery. If you are running a mail server, determine which protocols you are using and allow the appropriate types of traffic. We will also show you how to create a rule to block outgoing SMTP mail.

Block Outgoing SMTP Mail
If your server shouldn’t be sending outgoing mail, you may want to block that kind of traffic. To block outgoing SMTP mail, which uses port 25, run this command:

sudo ufw deny out 25
This configures your firewall to drop all outgoing traffic on port 25. If you need to reject a different service by its port number, instead of port 25, simply replace it.

Allow All Incoming SMTP
To allow your server to respond to SMTP connections, port 25, run this command:

sudo ufw allow 25
Note: It is common for SMTP servers to use port 587 for outbound mail.

Allow All Incoming IMAP
To allow your server to respond to IMAP connections, port 143, run this command:

sudo ufw allow 143
Allow All Incoming IMAPS
To allow your server to respond to IMAPS connections, port 993, run this command:

sudo ufw allow 993
Allow All Incoming POP3
To allow your server to respond to POP3 connections, port 110, run this command:

sudo ufw allow 110
Allow All Incoming POP3S
To allow your server to respond to POP3S connections, port 995, run this command:

sudo ufw allow 995

相关文章

  • UFW 设置教程

    https://www.digitalocean.com/community/tutorials/ufw-esse...

  • ubuntu18 防火墙ufw

    1- ufw 一般用户,只需如下设置:sudo apt-get install ufwsudo ufw enabl...

  • Ubuntu 快速掌握 UFW 防火墙配置

    Ubuntu最常用的防火墙是UFW,但是默认情况下是关闭状态的,查看下状态 UFW默认不限制端口访问的,所以要设置...

  • ufw常用指令

    apt-get install ufw 安装 ufw enable/disable:打开/关闭ufw ufw st...

  • ubuntu16.04中ufw的使用

    以下信息为网上搜集 开启ufwufw enable关闭ufwufw disable 设置默认策略sudo ufw ...

  • ubuntu防火墙设置

    ubuntu防火墙设置。 初始状态下直接设置即可,尽量不要尝试 重装 iptables 以及ufw,很容易导致 防...

  • 如何在mac终端连接ubuntu?

    1.设置root密码:sudo passwd root ,输入密码后,切换root : su root 2.ufw...

  • 自带防火墙ufw

    链接ufw命令的示例用法 ufw status # 查看ufw防火墙是否在工作,查看使用中的规则 ufw enab...

  • Ubuntu自带防火墙ufw配置和用法

    查看ufw防火墙是否在工作,查看使用中的规则 ufw status 启动ufw防火墙 ufw enable 启动默...

  • ufw on Debian

    一、ufw安装 二、设置 三、其他常用 四、卸载 <参考>https://wiki.ubuntu.org.cn/U...

网友评论

      本文标题:UFW 设置教程

      本文链接:https://www.haomeiwen.com/subject/rqqeactx.html