More issues

管理 https 证书:Certbot

今天在 github 看到一个 project 用 certbot 来管理证书,试用了下感觉还蛮简单的。主要有: * 开始的时候提供一个简版 nginx, 安装完 certbot 会自动修改 nginx conf * 自动生成 /etc/cron.d/certbot, 在 root 下面自动运行。 ps: Ubuntu Minimal 版本不带 cron, 所以要额外 sudo apt install cron 安装全过程: 1. Install nginx: sudo apt update sudo apt install -y nginx certbot python3-certbot-nginx 2. Put
1 min read

关闭 Ubuntu 20.04 Minimal 的 iptable 防火墙

在 Oracle Cloud 安装了 mysql DB,从其他机器怎么都连接不上去。查了很久,一点点的确认下面几个层次的问题: * mysql bind address: 不是 127.0.0.1 * mysql user: 不能指定 localhost * Ubuntu Firewalls: 关闭 iptables * Oracle Cloud subnet security rules: 开放内网 ip 端口 最复杂的是 iptables,机器安装后就已经一大串规则,我手动添加了开放 3306 端口后并没有效果。搞到我查了很久,以为哪里还有一层防火墙。 可以通过下面命令来清空所有规则: sudo iptables -F # 或者这个命令清空所有 groups iptables-save | awk '
1 min read

Subscribe to 成蹊笔记

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe