我已在 Debian Buster 上成功安装 Wireguard。现在我想稍后配置 IPv6。我已经这么做了。[Peer]
但-Section内的设置wg0.conf
似乎并不持久。
systemctl stop wg-quick@wg0.service
nano /etc/wireguard/wg0.conf
Run Code Online (Sandbox Code Playgroud)
结果:
[Peer]
PublicKey = xxxxx
AllowedIPs = 10.200.200.2/32, xxx:xxxx:xx:xxx:100::2/72
Run Code Online (Sandbox Code Playgroud)
保存并重新启动服务后,systemctl start wg-quick@wg0.service
看起来wg0.conf
不错。
当我再次重新启动虚拟机或服务时,所有其他设置都会丢失。
[Peer]
PublicKey = xxxxx
AllowedIPs = 10.200.200.2/32
Run Code Online (Sandbox Code Playgroud)
任何想法?
这就是我wg0.conf
应该的样子
[Interface]
Address = 10.200.200.1/24
Address = xxxx:xxx:xx:xxx::1/72
DNS = 10.200.200.1
SaveConfig = true
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j …
Run Code Online (Sandbox Code Playgroud) 很多地方都可以配置Fail2ban。
$ fail2ban-client -i
Fail2Ban v0.10.2 reads log file that contains password failure report
and bans the corresponding IP addresses using firewall rules.
Run Code Online (Sandbox Code Playgroud)
在 Debian Buster 上,我可以在几个配置文件中编辑我的设置:
/etc/fail2ban/jail.d/defaults-debian.conf
/etc/fail2ban/fail2ban.conf
/etc/fail2ban/jail.conf
/etc/fail2ban/action.d/
Run Code Online (Sandbox Code Playgroud)
一些教程推荐:
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
Run Code Online (Sandbox Code Playgroud)
fail2ban 的文档说:
修改应该发生在 .local 而不是 .conf 中。这避免了升级时的合并问题。这些文件都有详细的文档记录,并且应该可以在那里获得详细信息。
这是否意味着我要编辑的每个 .conf 文件都应该作为 .local 文件存在?
我很迷惑!有人可以对此有所了解吗?
我Postfix
与 Lets Encrypt 结合使用来传输 TLS 加密的电子邮件。
以下参数/etc/postfix/main.cf
是相关的:
smtp_tls_key_file = /etc/letsencrypt/live/foo.bar/privkey.pem
smtp_tls_cert_file = /etc/letsencrypt/live/foo.bar/fullchain.pem
smtp_tls_CAfile = /etc/letsencrypt/live/foo.bar/fullchain.pem
Run Code Online (Sandbox Code Playgroud)
我可以毫无问题地发送电子邮件,但收到警告消息,指出 Postfix 无法验证接收站点的证书:
postfix/smtp[10736]: Untrusted TLS connection established to example.com[xxx.xxx.xxx.xxx]:25: TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Run Code Online (Sandbox Code Playgroud)
我怀疑这是因为 Postfix 无法使用此参数访问其证书存储:
smtp_tls_CAfile = /etc/letsencrypt/live/foo.bar/fullchain.pem
Run Code Online (Sandbox Code Playgroud)
更改smtp_tls_CAfile = /etc/ssl/certs
将破坏我的整个 TLS 配置。
我需要配置什么才能使 Postfix 能够通过 Lets Encrypt 发送加密消息并检查接收方的证书?
我在 Debian 上运行带有附加接口的 Wireguard wg0
。有了这个 ufw 规则,我希望 ufw 能够通过我的流量:
ufw allow in on wg0 to any
Run Code Online (Sandbox Code Playgroud)
但 ufw 却阻塞了流量:
[14674.950320] [UFW BLOCK] IN=wg0 OUT=eth0 MAC= SRC=10.0.0.2 DST=54.xx.xx.xx LEN=64 TOS=0x00 PREC=0x00 TTL=63 ID=0 DF PROTO=TCP SPT=54263 DPT=443 WINDOW=65535 RES=0x00 SYN URGP=0
[14675.451891] [UFW BLOCK] IN=wg0 OUT=eth0 MAC= SRC=fd00:0000:0000:0000:0000:0000:0000:0002 DST=2a05:xxx LEN=84 TC=0
Run Code Online (Sandbox Code Playgroud)
有人知道这里发生了什么事吗?
我在 Debian Buster 上安装了 unbound。现在我想知道为什么 unbound 在每个协议上监听 2 次。
netstat -tulpn
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 1150/unbound
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 1150/unbound
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 605/sshd: /usr/sbin
tcp 0 0 127.0.0.1:8953 0.0.0.0:* LISTEN 1150/unbound
tcp6 0 0 :::22 :::* LISTEN 605/sshd: /usr/sbin
udp 0 0 0.0.0.0:53 0.0.0.0:* 1150/unbound
udp 0 0 0.0.0.0:53 0.0.0.0:* 1150/unbound
Run Code Online (Sandbox Code Playgroud)
谁能帮助我理解这一点?