AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
主页 / server / 问题

全部问题(server)

Martin Hope
Amon Bune
Asked: 2023-03-12 09:36:27 +0800 CST

STRATO:是否可以提供自己的权威 DNS 服务器?

  • 5

我正在考虑将我的域转移到 STRATO ( https://www.strato.de/ )。我有自己的/外部 DNS 服务器,我想将其用作权威 DNS 服务器。遗憾的是,帮助页面没有具体说明您是否可以将域的权威 DNS 地址从他们自己的 DNS(仅支持有限的 DNS 记录集)更改为另一个外部 DNS。

了解 STRATO 服务的人可以告诉是否可以在那里更改权威 DNS?

domain-name-system
  • 1 个回答
  • 22 Views
Martin Hope
BPDev
Asked: 2023-03-12 06:33:34 +0800 CST

服务使用的部署标签?

  • 5

在 Kubernetes 配置文件中命名标签时,我尝试更加明确,认为部署使用 pod 标签,服务使用部署标签。

apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-depl
  labels:
    app: auth-depl-label
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auth-pod-label
  template:
    metadata:
      labels:
        app: auth-pod-label
    spec:
      containers:
      - name: auth-pod
        image: bogdan-pechounov/auth
        ports:
        - containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
  name: auth-srv
spec:
  selector:
    app: auth-depl-label
  type: LoadBalancer
  ports:
  - protocol: TCP
    port: 3000
    targetPort: 3000

但是,在 Chrome 中minikube service auth-srv会产生This site can’t be reached错误。在 中minikube dashboard,服务处于挂起状态,并且没有与该服务关联的 pod。

使用 pod 标签确实有效,这让我想知道部署标签的用途。

apiVersion: v1
kind: Service
metadata:
  name: auth-srv
spec:
  selector:
    app: auth-pod-label
  type: LoadBalancer
  ports:
  - protocol: TCP
    port: 3000
    targetPort: 3000

完整代码(skaffold dev开始)

kubernetes
  • 1 个回答
  • 9 Views
Martin Hope
hanshenrik
Asked: 2023-03-10 17:49:55 +0800 CST

nginx 将所有 404 请求路由到 php 脚本

  • 7

我想将所有 404 请求路由到一个 php 脚本,我应该怎么做?我的 nginx 配置是:

server {
    listen 81;
    listen [::]:81;
    root /srv/http/paste.lan/www;
    autoindex on;
    client_max_body_size 20M;
    index index.txt index.html index.htm index.php;
    server_name paste.lan;
    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }

    # pass PHP scripts to FastCGI server
    #
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
    #
    #   # With php-fpm (or other unix sockets):
        fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
    #   # With php-cgi (or other tcp sockets):
    #   fastcgi_pass 127.0.0.1:9000;
    }


    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /\.ht {
        deny all;
    }
}

我尝试过的事情:

尝试 #1:

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ /index.php;
    }
  • 这仅适用于不以 .php 结尾的 URI,例如/DoesNotExist.ph传递给 index.php ,但/DoesNotExist.php获得标准的 nginx 404 页面。

尝试#2:

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }
    error_page 404 /index.php;

这种方法有效,所有 404 请求都传递给 index.php但这会强制响应代码为 404,即使 index.php 包含:

<?php
http_response_code(200);
die("index.php");

它仍然会提供响应代码 404 :(

尝试 #3:

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }
    error_page 404 =200 /index.php;

这也有点工作,所有 404 请求都传递给 index.php但这强制响应代码为 200,即使 index.php 包含:

<?php
http_response_code(400);// HTTP 400 Bad Request
die("index.php");

它仍将作为 HTTP 200 OK :(

nginx
  • 1 个回答
  • 35 Views
Martin Hope
burgermenu
Asked: 2023-03-10 04:06:09 +0800 CST

Exchange 2019 迁移 - 邮箱迁移

  • 5

我们正在从 2013 年迁移到 2019 年,到目前为止一切顺利。我已经移动了一组很好的用户邮箱,没有任何问题和连接、邮件流等。

我一直遇到的是这些隐藏的仲裁邮箱,我不知道它们是否需要迁移,这让我开始思考在停用我们的 2013 实例之前我还需要迁移什么。

目前,我知道迁移:用户、房间资源、共享邮箱。公共文件夹。

是否有需要迁移的内容和不需要迁移的内容的完整列表?在我们的 2013 实例被卸载和退役之前我应该​​运行命令以捕获这些东西并迁移它们吗?

我一直在互联网上搜索,试图找到任何东西,但大多数文章只是简单地说移动所有邮箱和公共文件夹,将 2013 关闭一周。如果没有问题,然后将其重新打开并运行卸载程序以适当地从域中删除 2013。

migration
  • 2 个回答
  • 29 Views
Martin Hope
cppbest
Asked: 2023-03-09 22:35:10 +0800 CST

如何在 Windows 启动时禁用自动网络连接?

  • 5

所以在 Linux 中你需要手动运行一些命令或者编写配置文件来连接到网络。在这些步骤之前,您可以在没有连接的情况下完美地使用系统。在 Windows 10 上可以实现这样的功能吗?目前,即使我还没有登录,我也会看到一堆数据包在某处运行。也就是说:是否可以在不禁用网络适配器或故意错误配置连接的情况下离线使用 Windows?

linux
  • 1 个回答
  • 24 Views
Martin Hope
Rockcat
Asked: 2023-03-09 20:02:49 +0800 CST

SSH 压缩会使协议更不安全吗?

  • 5

我正在使用名为lynis的工具审核一个 ubuntu 服务器,该工具对配置文件执行多项测试并提供强化服务器的建议。例如,它建议将 MaxAuthTries 的值从 6 减少到 3,这对我来说很有意义......但是有一个建议我不明白:

  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : Compression (set YES to NO)
      https://cisofy.com/lynis/controls/SSH-7408/

我已经阅读了给定的链接SSH-7408,并做了一些网络研究,但我不知道在 SSH 服务器中启用压缩如何使协议比禁用它更不安全。

ssh
  • 1 个回答
  • 60 Views
Martin Hope
fig314
Asked: 2023-03-09 18:53:31 +0800 CST

限制仅来自特定 ip 的路由

  • 5

目前我运行一个 openvpn 服务器,它在每个客户端基础上推送一条路由(不同的客户端接收不同的路由和静态 ip)。

ccd/client1
push "route 172.16.236.0 255.255.255.0"
ifconfig-push 10.8.0.29 255.0.0.0

然后我将流量从 vpn tun 接口路由到客户端特定的 docker 网络接口(多个)。

sudo iptables -A FORWARD -i tun0 -o br-6b1cd32adc27 -j ACCEPT
sudo iptables -A FORWARD -i br-6b1cd32adc27 -o tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -A POSTROUTING -o br-6b1cd32adc27 -j MASQUERADE

但是,如果一个客户端只是通过 ip 添加路由,则一个客户端有可能访问用于另一个客户端的接口。

ip route add 172.16.236.0/24 via 255.0.0.0

我想限制这种行为并以某种方式过滤仅对特定客户端 ip 地址访问特定接口。

我怎样才能使这成为可能?

networking
  • 2 个回答
  • 34 Views
Martin Hope
taiBsu
Asked: 2023-03-09 16:26:18 +0800 CST

设置自托管邮件服务器并从域路由 MX 记录

  • 4

我想离开我当前的电子邮件提供商,它也托管我的域,并在我的本地机器上设置一个 24/7 全天候运行的私人邮件服务器。

假设我有 4 个注册电子邮件地址[email protected], [email protected],[email protected]以及我在 IONOS 注册的域名在[email protected]哪里。example.com

我想使用我的 IONOS 域 DNS 配置并将example.comMX 服务器路由到我的本地计算机(可通过 DynDNS 域访问)。

  1. 我是否必须调整我的电子邮件客户端配置以直接使用我的私人机器的邮件服务器,或者是否仍然可以使用并且imap.ionos.de他们将负责路由到我的本地机器,该本地机器在我的 DynDNS 域的 MX 记录中提供?
  2. 设置这些后,我是否会遇到主要的黑名单和垃圾邮件标记问题,或者我的邮件地址是否仍会被列入白名单,因为它通过 imap/smtp.ionos.de 路由?

非常感谢。

email-server
  • 1 个回答
  • 32 Views
Martin Hope
Pahan
Asked: 2023-03-09 01:05:24 +0800 CST

nginx url 用特殊字符重写正则表达式

  • 5

如何编写一个正则表达式来匹配具有保留字符(如“+”、“-”)的路径节点?例如:

https://e.example.com/foo+/bar/file/test.txt需要重写为https://e.example.com/bar/file/test.txt

我试过了rewrite ^/foo+(/.*)$ break;,但它无法匹配字符串。

有什么建议么?

nginx
  • 1 个回答
  • 17 Views
Martin Hope
user1801810
Asked: 2023-03-09 00:56:39 +0800 CST

Postfix - 丢弃 EHLO 关键字重复的日志条目

  • 7

Ubuntu 20.04
后缀 3.4

对于我的 Postfix 收到的每条消息,我都会看到以下两个条目:

Mar  8 16:34:42 mail postfix/smtpd[863775]: discarding EHLO keywords: ETRN DSN
Mar  8 16:34:42 mail postfix/smtpd[863775]: discarding EHLO keywords: ETRN DSN

我的配置...

[email protected]:/etc/postfix$ postconf -n |grep smtpd_discard_ehlo_keywords
smtpd_discard_ehlo_keywords = ETRN, DSN

smtpd_discard_ehlo_keywords不存在于 master.cf 中,但即使它覆盖了 - 不是附加 - main.cf,对吗?

我怎样才能阻止这种行为或者这是正常的(尽管很奇怪)?

谢谢。

postfix
  • 1 个回答
  • 45 Views
下一页

Sidebar

Stats

  • 问题 199037
  • 回答 263511
  • 最佳答案 131755
  • 用户 66345
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve