Mongod 数据库与 Nginx。
连接到数据库时出现此错误。
“此请求已被阻止;内容必须通过 HTTPS 提供”。
我有一个由该 IP 加密的域 SSL。
此错误的解决方案是什么?如何使用 SSL 连接到我的特定 IP?
Mongod 数据库与 Nginx。
连接到数据库时出现此错误。
“此请求已被阻止;内容必须通过 HTTPS 提供”。
我有一个由该 IP 加密的域 SSL。
此错误的解决方案是什么?如何使用 SSL 连接到我的特定 IP?
我们正在尝试在数据中心安装一台装有 Ubuntu Server 22.04 的机器。DC 主机告诉我们这些公共 IP 地址:
因此,我们并不是真正的网络专家,但按照一些指南,我们将 netplan 配置文件更改为:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
addresses: [XXX.XXX.XXX.160/29]
routes:
- to: default
via: XXX.XXX.XXX.161
nameservers:
addresses: [8.8.8.8, 1.1.1.1]
eno2:
dhcp4: true
它仍然不起作用,我们在几个小时内尝试了很多东西。这里有更多信息和行为:
我们不知道问题是什么。我们错过了什么吗?Ubuntu 中是否需要一些额外的配置?我们是否需要额外的设备,例如路由器或交换机?我们的数据中心主机是否忘记告诉我们一条可能很重要的信息?
感谢您的帮助
目前我拥有 2 个发件人域aaa.com和bbb.com。限制是:
如果我想同时从两个域向单个接收域发送电子邮件,则以下 main.cf 配置不适用,因为所有电子邮件将在一个队列中待处理,而不是两个队列(每个发送域)。
default_destination_rate_delay=200s
smtp_destination_concurrency_limit = 2
smtp_extra_recipient_limit = 100
对于这种情况有什么解决办法吗?
Ubuntu LTS 22.04 上的最新版本 Zabbix (v6.4) 与电子邮件通知配合得很好。为了防止冗余,我想使用相同的包从同一服务器上的其他非 Zabbix 自定义脚本发送电子邮件。有谁知道Zabbix用什么来发送电子邮件?
工作 Zabbix 服务器上的“sudo apt list --installed”命令不会列出 postfix、sendmail 或我熟悉的任何其他邮件程序。
运行 Ubuntu 22,它仍然允许我以root用户身份通过 SSH 登录。
我在中运行以下配置/etc/ssh/sshd_config
:
PasswordAuthentication no
PermitEmptyPasswords no
PubkeyAuthentication yes
PermitRootLogin no
完整内容:
Include /etc/ssh/sshd_config.d/*.conf
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin without-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no
PubkeyAuthentication yes
PermitRootLogin no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
KbdInteractiveAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the KbdInteractiveAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via KbdInteractiveAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and KbdInteractiveAuthentication to 'no'.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
运行命令
strings $(which sshd) | grep -i "sshd_config"
显示配置文件的正确路径:
/etc/ssh/sshd_config
命令:
ls -l /etc/ssh/sshd_config.d/*.conf
ls: 无法访问 '/etc/ssh/sshd_config.d/*.conf': 没有这样的文件或目录
> sshd -T
port 22
addressfamily any
listenaddress [::]:22
listenaddress 0.0.0.0:22
usepam yes
logingracetime 120
x11displayoffset 10
maxauthtries 6
maxsessions 10
clientaliveinterval 0
clientalivecountmax 3
streamlocalbindmask 0177
permitrootlogin without-password
ignorerhosts yes
ignoreuserknownhosts no
hostbasedauthentication no
hostbasedusesnamefrompacketonly no
pubkeyauthentication yes
kerberosauthentication no
kerberosorlocalpasswd yes
kerberosticketcleanup yes
gssapiauthentication no
gssapicleanupcredentials yes
由此可见:
permitrootlogin without-password
另外,我发现,作为普通用户,我无法通过“su”作为 root 登录。但我可以从外部通过 SSH 登录。
我已经重新启动了 sshd-service 几次,甚至重新启动了服务器。
目录
我想实现 root 不再可以登录,只有专用用户可以通过 SSH 登录。如何实现这一目标?
我已将我的 Exim(在 Directadmin 上)更新到版本 4.97.1 在此过程中出现问题,现在我无法再发送电子邮件。我可以接收电子邮件(远程并使用 LMTP 和 Dovecot)。今天早上我还发现本地邮件也工作正常。根 -> exim -> 鸽舍。
当使用远程电子邮件应用程序时,我得到(经过普通测试和登录测试):
2024-04-15 07:51:01 plain authenticator failed for dynamic.caiway.nl ([192.168.178.2]) [xxx.xxx.xxx.xxx]: 535 Incorrect authentication data ([email protected])
2024-04-14 09:12:29 login authenticator failed for dynamic.caiway.nl ([192.168.178.2]) [xxx.xxx.xxx.xxx]: 535 Incorrect authentication data ([email protected])
使用端口 25 或端口 587 得到不同的结果。但证书没问题:
telnet server.example.com 25
Trying xx.xx.xx.xxx...
Connected to server.example.com.
Escape character is '^]'.
220 server.example.com ESMTP Exim 4.97.1 Mon, 15 Apr 2024 08:18:19 +0200
ehlo caiway.nl
250-server.example.com Hello dynamic.caiway.nl [xxx.xxx.xxx.xxx]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-PIPECONNECT
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
它说 STARTTLS 和 AUTH PLAIN LOGIN,所以我相信这很好。但是当通过 openssl 和 starttls 在端口 587 上连接时,我得到:
openssl s_client -starttls smtp -connect server.example.com:587 -showcerts
CONNECTED(00000003)
仅此而已,当通过端口 25 上的 openssl 连接时,我得到:
openssl s_client -starttls smtp -connect server.example.com:25 -showcerts
CONNECTED(00000003)
depth=2 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
verify return:1
depth=1 C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
verify return:1
depth=0 CN = example.com
verify return:1
Server certificate
subject=CN = example.com
issuer=C = GB, ST = Greater Manchester, L = Salford, O = Sectigo Limited, CN = Sectigo RSA Domain Validation Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA-PSS
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 6202 bytes and written 434 bytes
Verification: OK
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 4096 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
250 HELP
此外,使用 telnet 时端口 587 上的 EHLO 也会断开连接:
telnet server.example.com 587
Trying xx.xx.xx.xxx...
Connected to server.example.com.
Escape character is '^]'.
ehlo caiway.nl
Connection closed by foreign host.
上述测试的一些日志如下:
2024-04-15 08:19:18 TLS error on connection from dynamic.caiway.nl [xxx.xxx.xxx.xxx] (SSL_accept): (TLSv1.3)
2024-04-15 08:20:21 TLS error (SSL_read): on connection from dynamic.caiway.nl [xxx.xxx.xxx.xxx] error:0A000126:SSL routines::unexpected eof while reading
2024-04-15 08:21:07 TLS error on connection from dynamic.caiway.nl [xxx.xxx.xxx.xxx] (SSL_accept): error:0A000126:SSL routines::unexpected eof while reading
我有点迷失了,我首先以为这是证书问题。但端口 25 上的 openssl 和 -showcerts 显示所有证书都正常。Exim 正在宣传 AUTH 和 STARTTLS。但通过端口 587 连接时就会断开连接。
我的 Exim 配置显示了所有正确的值(我相信):
auth_advertise_hosts = ${if or { {eq {$received_port}{465}} {eq {$received_port}{587}} } {*}{}}
auth_advertise_hosts = ${if eq{$tls_cipher}{}{}{*}}
daemon_smtp_ports=25:587:465
tls_on_connect_ports=587:465
编辑----附加信息:从在调试模式下运行 exim 并输出我在从邮件客户端连接以发送电子邮件时得到此信息。
19:38:10 111203 login authenticator server_condition:
19:38:10 111203 $auth1 = [email protected]
19:38:10 111203 $auth2 = password
19:38:10 111203 $1 = [email protected]
19:38:10 111203 $2 = password
19:38:10 111203 ╭considering: ${perl{smtpauth}{0}}
19:38:10 111203 ╭considering: smtpauth}{0}}
19:38:10 111203 ├───────text: smtpauth
19:38:10 111203 ├considering: }{0}}
19:38:10 111203 ├──expanding: smtpauth
19:38:10 111203 ╰─────result: smtpauth
19:38:10 111203 ╭considering: 0}}
19:38:10 111203 ├───────text: 0
19:38:10 111203 ├considering: }}
19:38:10 111203 ├──expanding: 0
19:38:10 111203 ╰─────result: 0
19:38:10 111203 Starting Perl interpreter
19:38:10 111203 ├──expanding: ${perl{smtpauth}{0}}
19:38:10 111203 ╰─────result: 0
19:38:10 111203 expanded string: 0
19:38:10 111203 ╭considering: $1
19:38:10 111203 ├──────value: [email protected]
19:38:10 111203 ╰──(tainted)
19:38:10 111203 ├──expanding: $1
19:38:10 111203 ╰─────result: [email protected]
19:38:10 111203 ╰──(tainted)
19:38:10 111203 SMTP>> 535 Incorrect authentication data
这里仍然没有现实世界的信息。
有什么建议吗?我有点迷失了,不知道从哪里开始/看。
我已经在 Ubuntu 22.04.4 LTS 上使用 Zabbly 内核几个月了,它运行得很好,但 Ubuntu 仍然想安装自己的通用内核,而我不想要它。
问题一:系统是否需要通用内核(模块、头文件)?
问题二:如果问题一的答案是否定的,如何将新通用 Ubuntu 内核的安装列入黑名单?
我想阻止安装任何新的 Ubuntu 内核。
我目前正在通过 ssh 连接到我的服务器。我还有一个在同一服务器上运行的鱿鱼代理,我希望能够通过代理连接到 ssh,大概是通过服务器本地主机进行 ssh 吗?
目前尝试这样做会得到 403 响应。
我需要更改哪些配置才能使其正常工作?
另外,这是否被认为是好的做法,因为它将允许摆脱服务器端的 ssh 专用端口?
我不是服务器管理员,但我们现任的服务器管理员离开了。所以暂时就由我来照顾事情了。我们的系统目前受公钥/私钥保护。但在进行一些调查时,我发现唯一的访问权限是通过这个密钥。我不相信有任何可以访问的辅助帐户。根已被锁定。这让我很困扰,因为如果由于任何原因密钥失败/过期,我们将被锁定。正如我所说,我不是服务器管理员,但我认为我们至少需要另一个非 root 的可访问帐户,可能具有 sudo 权限。
现在问题来了,我们有大约 30 个 Ubuntu 主要是 Web 服务器,管理所有这些密码似乎是一件苦差事。我还不想进去创建帐户。我需要有关配置对 30 多个(并且还在不断增加)服务器的访问的最佳方法的建议。
考虑到经济增长,保护环境的最佳方法是什么?我是否只需要手动配置所有这些帐户并使用单独的密码?或者我们应该考虑使用目录服务?如果是的话,你会推荐什么 Ubuntu?
我设置了一个 samba 服务器,并且希望网络上的所有客户端都使用相同的 DNS 服务器。
我已配置服务器(ubuntu/bind9:9.18-22.04_beta)如下。我不太明白如何配置我的区域以免再出现任何错误。
NS1 LOG
10-Mar-2024 10:27:35.502 DNS format error from 10.3.0.9#53 resolving _ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.wit.yooml.lan/SRV for 10.3.0.1#35268: non-improving referral
10-Mar-2024 10:27:35.502 FORMERR resolving '_ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.wit.yooml.lan/SRV/IN': 10.3.0.9#53
NS2 LOG
10-Mar-2024 10:26:42.653 all zones loaded
10-Mar-2024 10:26:42.653 running
10-Mar-2024 10:26:52.649 resolver priming query complete: timed out
10-Mar-2024 10:26:52.649 managed-keys-zone/internal: Unable to fetch DNSKEY set '.': timed out
#NS1 CONF
view "internal" {
match-clients { 192.168.0.0/16; localhost; };
dnssec-validation yes;
recursion yes;
forwarders {
10.3.0.7; #AdGuard
};
zone "yooml.lan" {
type forward;
forward only;
forwarders { 10.3.0.9; }; #NS2
};
};
#NS2 CONF
view "internal" {
match-clients { 10.3.0.6/32; }; #NS1
zone "yooml.lan" {
type master;
file "/etc/bind/db.yooml.lan";
#dnssec-policy default;
serial-update-method increment;
};
};
$TTL 60
@ IN SOA ns2.yooml.lan. [email protected]. (2023081404 86400 3600 3600000 300)
IN NS ns2.yooml.lan.
test IN A 192.168.0.1
wit IN NS delta.wit.yooml.lan.
delta.wit.yooml.lan. IN A 10.3.0.8