安装ufw
sudo apt update
sudo apt install ufw
开启防火墙
ufw enable
关闭防火墙
ufw disable
查看策略:
ufw status verbose
ufw status numbered
恢复默认策略:
ufw default deny incoming
ufw default allow outgoing
ufw default reject routed
重置UFW(将删除所有自定义策略并关闭UFW)
ufw reset
添加允许连接的商端口:
ufw allow [port]
放行指定范围的端口:
ufw allow 10010:10086/tcp
ufw allow 10010:10086/udp
允许指定ip访问
# 放行ip
ufw allow 221.123.1.1
ufw allow 221.123.1.1 to any port 22
# 放行ip段
ufw allow 221.123.1.0/24
ufw allow 221.123.1.0/24 to any port 22
拒绝连接
ufw deny http
ufw deny from 221.123.1.1
删除规则
# 按编号删除
ufw delete [num]
# 按实际规则删除
ufw delete allow http
# or
ufw delete allow 80
版权属于: 三三世界-百宝箱
本文链接: http://33f.net/linux/debian_firewall_ufw.html
本文最后更新于2022年05月01日 ,已超过946天没有更新,若内容或图片失效,请留言反馈。
本文允许转载,但请在转载时请以超链接或其它形式标明文章出处
@Doug Shume it's ok for me , you can post here.
Saved as a favorite, I like your website!
If some one wishes to be updated with hottest technologies after that he must be visit this site and be up to date daily.
Heello would you mind sharing which blog platform you're using? I'm planning to start my own blog in the near future but I'm having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then moost blogs and I'm looking for something completely unique. P.S Apologies forr being off-topic butt I had to ask!
Thanks to my father who shared with me regarding this webpage, this website is genuinely amazing.
Hi, I have an overflow of customers that I'd like to send to you but I want to make sure you can handle more leads, let me know if you'd like me to send you more info.
zh.us.to 有效
kms.03k.org 有效
kms.chinancce.com
kms.shuax.com 有效
kms.dwhd.org 有效
kms.luody.info 有效
kms.digiboy.ir 有效
kms.lotro.cc 有效
www.zgbs.cc 有效
cy2617.jios.org 有效
@ 权限问题,试试sudo 再加命令。
你好提示Permission denied 怎么办啊