页面“文件:Esport.png”与“Ufw on debian”之间的差异
(页面间的差异)
跳到导航
跳到搜索
第1行: | 第1行: | ||
+ | [[category:ops]] [[category:debian]] | ||
+ | =* install= | ||
+ | |||
+ | apt install ufw | ||
+ | |||
+ | =* Configuration= | ||
+ | <pre> | ||
+ | ufw enable | ||
+ | Command may disrupt existing ssh connections. Proceed with operation (y|n)? y | ||
+ | Firewall is active and enabled on system startup | ||
+ | |||
+ | |||
+ | |||
+ | ufw default deny incoming | ||
+ | ufw default allow outgoing | ||
+ | |||
+ | ufw status verbose | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | =* Firewall Rules= | ||
+ | <pre> | ||
+ | ufw app list | ||
+ | |||
+ | |||
+ | ufw allow 'SSH' | ||
+ | ufw allow 22/tcp | ||
+ | ufw allow WWW #其实就是80 | ||
+ | |||
+ | |||
+ | |||
+ | ufw allow 'Nginx HTTP' | ||
+ | |||
+ | |||
+ | ufw allow 53/tcp </pre> | ||
+ | |||
+ | |||
+ | |||
+ | ==** Port Ranges == | ||
+ | <pre> | ||
+ | Port ranges may also be specified, a simple example for tcp would be: | ||
+ | |||
+ | ufw allow 1000:2000/tcp | ||
+ | |||
+ | and for udp: | ||
+ | |||
+ | ufw allow 1000:2000/udp</pre> | ||
+ | |||
+ | ==** IP address== | ||
+ | <pre>An IP address may also be used: | ||
+ | |||
+ | ufw allow from 111.222.333.444</pre> | ||
+ | |||
+ | =* Deleting Rules= | ||
+ | <pre> | ||
+ | Rules may be deleted with the following command: | ||
+ | |||
+ | ufw delete allow ssh</pre> | ||
+ | |||
+ | |||
+ | =* see also= | ||
+ | https://wiki.debian.org/Uncomplicated%20Firewall%20%28ufw%29 | ||
+ | |||
+ | |||
+ | https://help.ubuntu.com/community/UFW | ||
+ | |||
+ | https://www.digitalocean.com/community/tutorials/how-to-setup-a-firewall-with-ufw-on-an-ubuntu-and-debian-cloud-server | ||
+ | |||
+ | [https://zhuanlan.zhihu.com/p/36646621 ubuntu ufw 防火墙] |
2020年2月28日 (五) 02:36的版本
目录
* install
apt install ufw
* Configuration
ufw enable Command may disrupt existing ssh connections. Proceed with operation (y|n)? y Firewall is active and enabled on system startup ufw default deny incoming ufw default allow outgoing ufw status verbose
* Firewall Rules
ufw app list ufw allow 'SSH' ufw allow 22/tcp ufw allow WWW #其实就是80 ufw allow 'Nginx HTTP' ufw allow 53/tcp
** Port Ranges
Port ranges may also be specified, a simple example for tcp would be: ufw allow 1000:2000/tcp and for udp: ufw allow 1000:2000/udp
** IP address
An IP address may also be used: ufw allow from 111.222.333.444
* Deleting Rules
Rules may be deleted with the following command: ufw delete allow ssh
* see also
https://wiki.debian.org/Uncomplicated%20Firewall%20%28ufw%29
文件历史
单击某个日期/时间查看对应时刻的文件。
日期/时间 | 缩略图 | 大小 | 用户 | 备注 | |
---|---|---|---|---|---|
当前 | 2020年1月11日 (六) 03:08 | 691 × 729(52 KB) | Evan(讨论 | 贡献) |
- 您不可以覆盖此文件。
文件用途
以下页面使用本文件: