AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

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

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-336012

arne.z's questions

Martin Hope
arne.z
Asked: 2017-06-15 14:58:29 +0800 CST

MIT Kerberos 在对 OpenSSH 进行身份验证时不断要求输入密码

  • 6

我正在尝试设置一个简单的 Kerberos 环境,该环境由 Kerberos 服务器 (KDC)、客户端计算机和运行 OpenSSH 守护程序的服务器计算机组成。在与服务器机器建立 SSH 连接时,客户端应该通过 Kerberos 进行身份验证。

我要验证的 Kerberos 用户的名称是krbuser. 此用户存在于服务计算机上,并且具有 uid 1001。奇怪的是我用SSH登录的时候需要输入Kerberos用户的密码。每次我登录。不仅是我的第一次连接。这看起来很奇怪,因为 Kerberos 的全部意义在于无需密码即可进行身份验证。

我在身份验证过程中进行了 tcpdump,并注意到客户端正在使用 cname 对 KDC 执行 AS-REQ root。这个 Kerberos 用户名没有,我不知道客户端为什么使用这个名称。正如预期的那样,KDC 以eRR-C-PRINCIPAL-UNKNOWN消息响应,因为数据库中没有root用户。

对我来说,主要问题似乎是客户端尝试以身份验证root而不是krbuser.

我将在下面发布有关我当前配置的一些信息。如果您需要任何其他信息,请告诉我。

在 KDC 上:

/etc/krb5.conf

[logging]
    default = FILE:/usr/local/krb5/var/log/krb5lib.log 
    kdc = FILE:/usr/local/krb5/var/log/krb5kdc.log
    admin_server = FILE:/usr/local/krb5/var/log/kadmin.log

[libdefaults]
    default_realm = metz.prac.os3.nl
    rdns = false

# The following krb5.conf variables are only for MIT Kerberos.
    krb4_config = /etc/krb.conf
    krb4_realms = /etc/krb.realms
    kdc_timesync = 1
    ccache_type = 4
    forwardable = true
    proxiable = true

[realms]
    metz.prac.os3.nl = {
        kdc = krb-0.metz.prac.os3.nl
        admin_server = krb-0.metz.prac.os3.nl
    }

在服务机器上:

/etc/ssh/sshd config(摘录)

# Kerberos options
KerberosAuthentication yes
# KerberosGetAFSToken no
# KerberosOrLocalPasswd no
# KerberosTicketCleanup yes

# GSSAPI options
GSSAPIAuthentication yes
# GSSAPICleanupCredentials yes

在 SSH 身份验证期间捕获的日志文件:

debug1: rekey after 4294967296 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: KEX done [preauth]
debug1: userauth-request for user root service ssh-connection method none [preauth]
debug1: attempt 0 failures 0 [preauth]
debug1: PAM: initializing for "root"
debug1: PAM: setting PAM_RHOST to "218.65.30.30"
debug1: PAM: setting PAM_TTY to "ssh"
debug1: userauth-request for user root service ssh-connection method password [preauth]
debug1: attempt 1 failures 0 [preauth]
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: restore_uid: 0/0
debug1: Kerberos password authentication failed: Client '[email protected]' not found in Kerberos database
debug1: krb5_cleanup_proc called
debug1: inetd sockets after dupping: 5, 5
Connection from 145.100.110.115 port 51946 on 145.100.110.116 port 22
debug1: Client protocol version 2.0; client software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 pat OpenSSH* compat 0x04000000
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: permanently_set_uid: 106/65534 [preauth]
debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: algorithm: [email protected] [preauth]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256 [preauth]
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none [preauth]
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none [preauth]
debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
debug1: rekey after 134217728 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
debug1: rekey after 134217728 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: KEX done [preauth]
debug1: userauth-request for user krbuser service ssh-connection method none [preauth]
debug1: attempt 0 failures 0 [preauth]
debug1: PAM: initializing for "krbuser"
debug1: PAM: setting PAM_RHOST to "145.100.110.115"
debug1: PAM: setting PAM_TTY to "ssh"
debug1: userauth-request for user krbuser service ssh-connection method gssapi-with-mic [preauth]
debug1: attempt 1 failures 0 [preauth]
debug1: PAM: password authentication failed for root: Authentication failure
Failed password for root from 218.65.30.30 port 18460 ssh2
debug1: userauth-request for user root service ssh-connection method password [preauth]
debug1: attempt 2 failures 1 [preauth]
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: restore_uid: 0/0
debug1: Kerberos password authentication failed: Client '[email protected]' not found in Kerberos database
debug1: krb5_cleanup_proc called
debug1: PAM: password authentication failed for root: Authentication failure
Failed password for root from 218.65.30.30 port 18460 ssh2
debug1: userauth-request for user root service ssh-connection method password [preauth]
debug1: attempt 3 failures 2 [preauth]
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: restore_uid: 0/0
debug1: Kerberos password authentication failed: Client '[email protected]' not found in Kerberos database
debug1: krb5_cleanup_proc called
debug1: PAM: password authentication failed for root: Authentication failure
Failed password for root from 218.65.30.30 port 18460 ssh2
debug1: userauth-request for user krbuser service ssh-connection method password [preauth]
debug1: attempt 2 failures 0 [preauth]
debug1: temporarily_use_uid: 1001/1001 (e=0/0)
debug1: restore_uid: 0/0
debug1: temporarily_use_uid: 1001/1001 (e=0/0)
debug1: restore_uid: 0/0
debug1: do_pam_account: called
Accepted password for krbuser from 145.100.110.115 port 51946 ssh2
debug1: monitor_child_preauth: krbuser has been authenticated by privileged process
debug1: monitor_read_log: child log fd closed
debug1: temporarily_use_uid: 1001/1001 (e=0/0)
debug1: ssh_gssapi_storecreds: Not a GSSAPI mechanism
debug1: restore_uid: 0/0
debug1: PAM: establishing credentials
User child is on pid 20617
debug1: SELinux support disabled
debug1: PAM: establishing credentials
debug1: permanently_set_uid: 1001/1001
debug1: rekey after 134217728 blocks
debug1: rekey after 134217728 blocks
debug1: ssh_packet_set_postauth: called
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype [email protected] want_reply 0
debug1: server_input_channel_req: channel 0 request pty-req reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req pty-req
debug1: Allocating pty.
debug1: session_new: session 0
debug1: SELinux support disabled
debug1: session_pty_req: session 0 alloc /dev/pts/2
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug1: server_input_channel_req: channel 0 request shell reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req shell
Starting session: shell on pts/2 for krbuser from 145.100.110.115 port 51946 id 0
debug1: Setting controlling tty using TIOCSCTTY.
debug1: userauth-request for user root service ssh-connection method password [preauth]
debug1: attempt 4 failures 3 [preauth]
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: restore_uid: 0/0
debug1: Kerberos password authentication failed: Client '[email protected]' not found in Kerberos database
debug1: krb5_cleanup_proc called
debug1: PAM: password authentication failed for root: Authentication failure
Failed password for root from 218.65.30.30 port 18460 ssh2
debug1: userauth-request for user root service ssh-connection method password [preauth]
debug1: attempt 5 failures 4 [preauth]
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: restore_uid: 0/0
debug1: Kerberos password authentication failed: Client '[email protected]' not found in Kerberos database
debug1: krb5_cleanup_proc called
debug1: PAM: password authentication failed for root: Authentication failure
Failed password for root from 218.65.30.30 port 18460 ssh2
debug1: userauth-request for user root service ssh-connection method password [preauth]
debug1: attempt 6 failures 5 [preauth]
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: restore_uid: 0/0
debug1: Kerberos password authentication failed: Client '[email protected]' not found in Kerberos database
debug1: krb5_cleanup_proc called
debug1: PAM: password authentication failed for root: Authentication failure
Failed password for root from 218.65.30.30 port 18460 ssh2
maximum authentication attempts exceeded for root from 218.65.30.30 port 18460 ssh2 [preauth]
Disconnecting: Too many authentication failures [preauth]
debug1: do_cleanup [preauth]
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup
debug1: PAM: cleanup
debug1: Killing privsep child 20604
debug1: audit_event: unhandled event 12
debug1: inetd sockets after dupping: 5, 5
Connection from 218.65.30.30 port 58146 on 145.100.110.116 port 22
debug1: Client protocol version 2.0; client software version nsssh2_4.0.0032 NetSarang Computer, Inc.
debug1: no match: nsssh2_4.0.0032 NetSarang Computer, Inc.
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: permanently_set_uid: 106/65534 [preauth]
debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: algorithm: diffie-hellman-group14-sha1 [preauth]
debug1: kex: host key algorithm: ssh-rsa [preauth]
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: none [preauth]
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: none [preauth]
debug1: expecting SSH2_MSG_KEXDH_INIT [preauth]

在客户端机器上:

kinit和klist认证之前:

$ kinit -p krbuser
$ klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: [email protected]

Valid starting     Expires            Service principal
06/15/17 00:24:05  06/15/17 10:24:05  krbtgt/[email protected]
    renew until 06/16/17 00:23:56

/etc/ssh/ssh config(摘录):

    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials yes
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no

最后是 SSH 身份验证:

$ ssh [email protected] -vvv
...
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "service-0.metz.prac.os3.nl" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to service-0.metz.prac.os3.nl [145.***.***.***] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/client/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/client/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/client/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/client/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/client/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/client/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/client/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/client/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
...
debug1: Found key in /home/client/.ssh/known_hosts:3
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug2: key: /home/client/.ssh/id_rsa ((nil))
debug2: key: /home/client/.ssh/id_dsa ((nil))
debug2: key: /home/client/.ssh/id_ecdsa ((nil))
debug2: key: /home/client/.ssh/id_ed25519 ((nil))
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup gssapi-keyex
debug3: remaining preferred: gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-keyex
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug2: we did not send a packet, disable method
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug3: send packet: type 50
debug2: we sent a gssapi-with-mic packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: send packet: type 50
debug2: we sent a gssapi-with-mic packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: send packet: type 50
debug2: we sent a gssapi-with-mic packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: send packet: type 50
debug2: we sent a gssapi-with-mic packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
...
debug1: Next authentication method: password
[email protected]'s password: <entering PW of Kerberos user> !!!
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (password).
Authenticated to service-0.metz.prac.os3.nl ([145.***.***.***]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 91
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
...
debug3: Ignored env _
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Last login: Thu Jun 15 00:28:57 2017

Connection established

现在klist显示以下票证:

$ klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: [email protected]

Valid starting     Expires            Service principal
06/15/17 00:24:05  06/15/17 10:24:05  krbtgt/[email protected]
    renew until 06/16/17 00:23:56
06/15/17 00:27:37  06/15/17 10:24:05  host/service-0.metz.prac.os3.nl@
    renew until 06/16/17 00:23:56
06/15/17 00:27:37  06/15/17 10:24:05  host/[email protected]
    renew until 06/16/17 00:23:56

因此,总结一下:客户端上的 Kerberos 用户可以通过输入其 Kerberos (!) 密码来建立与服务器的 SSH 会话。不是它的 UNIX 密码。tcpdump 显示客户端验证为root不是 Kerberos 用户,我不知道为什么它使用此用户名而不是krbuser. 这是我与kinit命令一起使用的那个。

谁能告诉我为什么此身份验证无法正常工作?如果您需要更多信息,请告诉我。我试图保持简短。

ubuntu
  • 3 个回答
  • 9482 Views
Martin Hope
arne.z
Asked: 2017-06-15 07:49:50 +0800 CST

如何更改 MIT Kerberos 的 ccache 类型

  • 3

MIT Kerberos 文档列出了七种不同的方式来存储 Kerberos 凭证:

  1. API
  2. 目录
  3. 文件
  4. KCM
  5. 钥匙圈
  6. 记忆
  7. MSLSA

目前,我的 Kerberos 设置将凭据存储在/tmp 目录中的文件中。在我的krb5.conf文件中,该ccache_type选项默认设置为 4:

# The following krb5.conf variables are only for MIT Kerberos.
        krb4_config = /etc/krb.conf
        krb4_realms = /etc/krb.realms
        kdc_timesync = 1
        ccache_type = 4
        forwardable = true
        proxiable = true

在 MIT Kerberos 文档中关于krb5.conf该选项的文件中说ccache_type:

此参数确定 kinit 或其他程序创建的凭据缓存类型的格式。默认值为 4,表示最新格式。较小的值可用于与非常旧的 Kerberos 实现兼容,后者与同一主机上的凭证缓存交互。

该ccache_type选项的值似乎与文档列出的七种 ccache 类型不对应。由于4指定使用“最新格式”而不是“KCM”。

因此,我的问题是:如何配置 Kerberos 以使用不同的 ccache 类型,例如密钥环或内存?

ubuntu
  • 1 个回答
  • 2868 Views
Martin Hope
arne.z
Asked: 2017-06-14 12:19:58 +0800 CST

将 keytab 文件复制到哪些服务器

  • 2

我正在尝试设置一个简单的 Kerberos 环境,其中客户端服务器通过 Kerberos 服务器对 Web 服务(在我的情况下为 OpenSSH)进行身份验证。

我在 KDC 上生成了一个 keytab 文件,但不太确定要将文件复制到哪些服务器。我只需要将其复制到提供服务的机器上,还是复制到想要对服务进行身份验证的客户端机器上?

ubuntu
  • 1 个回答
  • 1220 Views
Martin Hope
arne.z
Asked: 2017-03-03 06:36:15 +0800 CST

检索 Weave 路由信息

  • 0

我正在使用Wea​​ve Net跨不同主机连接我的 Docker 容器。Weave 正在使用“Fast Datapath”来处理内核空间中的路由(在OVS(Open vSwitch)模块内部,如下图所示。)

编织路由

为了更好地了解 Weave 如何路由流量,我想查看 OVS 模块的路由条目。有诸如ovs-vsctl show“打印数据库内容的简要概述”之类的命令,但这不起作用。似乎 Weave 正在运行自己的 OVS 实例,无法使用此命令访问该实例。

我也试过用

weave status        [targets | connections | peers | dns | ipam]

命令,但也没有显示任何详细的路由信息​​。

那么,有谁知道如何查看 weave 用来决定将发往某个 docker 容器的数据包路由到何处的路由表?

routing networking docker weave
  • 1 个回答
  • 316 Views
Martin Hope
arne.z
Asked: 2017-01-28 07:07:04 +0800 CST

NMAP 扫描哪些端口以进行操作系统检测

  • 0

nmap通过发送六个探测数据包并分析它们的响应,提供基于 TCP/IP 指纹识别的操作系统检测功能。在文档中说,其中一些被发送到一个开放端口,一些被发送到一个封闭端口。

有谁知道如何nmap决定将探针发送到哪个端口?它只是寻找第一个关闭的端口和它可以找到的第一个开放的端口吗?它是否按特定顺序搜索它们?还是随机选择一个端口?

port port-scanning nmap
  • 2 个回答
  • 1126 Views
Martin Hope
arne.z
Asked: 2016-10-19 05:15:21 +0800 CST

Rspamd 的 EXIM 配置中存在未知 ACL 条件/修饰符

  • 0

我正在尝试将 EXIM 配置为使用 Rspamd 作为垃圾邮件过滤器。我正在运行 Exim 4.87 版,并使用此处apt-get解释的方法从存储库安装 Rpsam 。然后我将Rspamd 文档中的建议配置添加到我的配置文件中:

begin acl

# configure Rspamd
# Please note the variant parameter
spamd_address = 127.0.0.1 11333 variant=rspamd   # error occurs here

acl_smtp_data = acl_check_spam

acl_check_spam:
  # do not scan messages submitted from our own hosts
  accept hosts = +relay_from_hosts

  # do not scan messages from submission port
  accept condition = ${if eq{$interface_port}{587}}

  # skip scanning for authenticated users
  accept authenticated = *

  # add spam-score and spam-report header when told by rspamd
  warn  spam       = nobody:true
        condition  = ${if eq{$spam_action}{add header}}
        add_header = X-Spam-Score: $spam_score ($spam_bar)
        add_header = X-Spam-Report: $spam_report

  # use greylisting available in rspamd v1.3+
  defer message    = Please try again later
        condition  = ${if eq{$spam_action}{soft reject}}

  deny  message    = Message discarded as high-probability spam
        condition  = ${if eq{$spam_action}{reject}}

  accept

当我尝试重新启动 Exim 时,我收到以下错误消息:

error in ACL: unknown ACL condition/modifier in "spamd_address = 127.0.0.1 11333 variant=rspamd"

这是指我上面发布的配置代码的第 4 行:spamd_address = 127.0.0.1 11333 variant=rspamd. 我在官方 Exim 文档中找到了完全相同的行。所以它应该工作。之前有人在配置 Exim 以使用 Rspamd 时遇到过这个问题吗?

我正在使用 Ubuntu:

$ uname -a
Linux calais 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ubuntu exim spam-filter
  • 1 个回答
  • 1142 Views
Martin Hope
arne.z
Asked: 2016-05-03 14:40:44 +0800 CST

如何查看 ubuntu 服务器上是否启用了 tcp-offloading?

  • 0

我想知道我的 Ubuntu VM 是否使用 tcp-offloading 来提高 VXLAN 封装的性能。在我的机器上哪里可以找到这些信息?

ubuntu vlan tcp-offload-engine
  • 3 个回答
  • 3295 Views
Martin Hope
arne.z
Asked: 2016-04-27 13:03:39 +0800 CST

运行 UDP 测试时 Iperf3 一直挂起

  • 0

我编写了一个 Python 程序,该程序iperf3在具有不同数据报大小的 for 循环中运行。我正在使用 Python 的subprocess.call函数iperf3像这样运行:

 iperf3 -u -c 185.82.21.60 -b 100M -t 5 -l <datagram size>

我的数据报大小从 1000 开始,每次迭代后增加 100,并且应该一直运行,直到达到 2000 的大小。每次我运行我的程序时,iperf3 在第 6 次之后一直挂起并开始使用我的一个 CPU 的 100%。在此之后,我无法再使用 iperf3,直到我终止正在运行的客户端进程并重新启动 iper3 服务器。

这是一张图片来说明我的问题: 在此处输入图像描述

udp python iperf linux-networking
  • 1 个回答
  • 1718 Views
Martin Hope
arne.z
Asked: 2016-04-18 10:20:24 +0800 CST

在 Docker 中运行 nuttcp 时出现分段错误

  • 4

我正在测量由 Docker 的本机覆盖网络连接的两个 Docker 容器之间的 UDP 吞吐量。我已经使用过iperf,但也想用nuttcp. 但是当我启动服务器实例然后启动客户端实例时,服务器实例崩溃并显示以下错误消息:Segmentation fault (core dumped). 这就是我启动服务器的方式:

nuttcp -S -u --nofork

这就是我启动客户端的方式:

nuttcp -u -T 115 10.0.0.3

服务器实例在启动客户端后直接崩溃。我使用相同的命令在nuttcpDocker 之外运行,没有任何问题。

以下是有关我正在使用的版本的一些附加信息:

# inside the container:
$ uname -a
Linux 310d92462ac0 3.19.0-58-generic #64~14.04.1-Ubuntu SMP Fri Mar 18 19:05:43 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ nuttcp -V
nuttcp-6.1.2

# outside the container:
$ uname -a
Linux libAMS 3.19.0-58-generic #64~14.04.1-Ubuntu SMP Fri Mar 18 19:05:43 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ docker -v
Docker version 1.10.3, build 20f81dd

有谁知道如何解决这个问题?

udp testing iperf docker linux-networking
  • 1 个回答
  • 723 Views
Martin Hope
arne.z
Asked: 2016-04-14 05:37:50 +0800 CST

衡量覆盖网络性能的正确方法

  • 7

我目前正在检查不同 Docker 覆盖网络的性能(尤其是 UDP 吞吐量)。我通过在与 Docker 覆盖网络连接的两台主机之间创建点对点连接来做到这一点,然后iperf在 Docker 容器内运行以检查吞吐量。我注意到每次我iperf作为客户端运行以将数据发送到iperf作为服务器运行的另一个容器时,客户端主机的 CPU 使用率达到 100%。我通过运行在此处找到的以下命令得到了该结果:

top -bn1 | grep "Cpu(s)" | \
       sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | \
       awk '{print 100 - $1"%"}'

所以,在我看来,我的吞吐量测试的限制因素似乎是我的主机的 CPU 容量,因为它以 100% 的速度运行并且无法产生更多的流量来使网络连接饱和。我想知道这是否是一个iperf特定问题,所以我想使用不同的工具运行相同的测试,但不确定哪种替代方案是最好的。主机正在运行 Ubuntu。例如,我发现qperf和。uperfnetpipe

此外,更一般地说,我开始想知道吞吐量性能的瓶颈通常是什么。不总是CPU容量或链路的带宽吗?哪些是与覆盖网络没有直接关系的因素。

这是否意味着应用程序(或覆盖网络)的吞吐量仅取决于传输一定数量的数据需要多少 CPU 周期,以及它如何压缩数据以适应网络(如果这将成为瓶颈)。

iperf docker linux-networking stress-testing cpu-usage
  • 1 个回答
  • 704 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • 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