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-70156

blee's questions

Martin Hope
blee
Asked: 2020-11-27 23:28:39 +0800 CST

适用于本机 Android IKEv2 IPsec 的 Strongswan swanctl 配置文件

  • 0

Android 11 现在似乎支持 IKEv2/IPsec,所以我正在尝试为它构建一个 roadwarrior swanctl 配置文件。到目前为止,我已经建立了 SA,但随后立即被删除。有什么建议吗?

Android VPN 配置文件具有:

  • 类型:IKEv2/IPsec PSK
  • 服务器:moon.isuldor.com
  • IPsec 标识符:isuldor.com 上的 strongswan
  • IPsec PSK:猎人2

我的 vpn 网关有:

$ swanctl --version
strongSwan swanctl 5.9.0

$ cat /etc/swanctl/conf.d/android11.conf
connections {
    rw-isuldor {
        local_addrs = moon.isuldor.com
        pools = android11_pool4, android11_pool6
        fragmentation = yes
        send_cert = always
        rekey_time = 0s
        dpd_delay = 30s
        local {
            auth = pubkey
            certs = moon.pem
            id = moon.isuldor.com
        }
        remote {
            auth = psk
            id = strongswan at isuldor.com
        }
        children {
            moon {
                local_ts  = 0.0.0.0/0,::/0
                rekey_time = 0s
                dpd_action = clear
            }
        }
    }
}
secrets {
    ike-isuldor {
        id_isuldor = strongswan at isuldor.com
        secret = hunter2
    }
}
pools {
    android11_pool4 {
        addrs = 192.168.2.0/24
        dns = 1.1.1.1,1.0.0.1
    }
    android11_pool6 {
        addrs = 2607:9cf3:0:ae::6:1300/120
        dns = 2606:4700:4700::1111,2606:4700:4700::1001
    }
}

来自 charon-systemd 的相关日志:

X.X.X.X is initiating an IKE_SA
IKE_SA (unnamed)[11] state change: CREATED => CONNECTING
selected proposal: IKE:AES_CBC_128/HMAC_SHA2_256_128/PRF_AES128_XCBC/MODP_3072
remote host is behind NAT
...
looking for peer configs matching Y.Y.Y.Y[moon.isuldor.com]...X.X.X.X[strongswan at isuldor.com]
selected peer config 'rw-isuldor'
authentication of 'strongswan at isuldor.com' with pre-shared key successful
...
peer requested virtual IP %any
assigning new lease to 'strongswan at isuldor.com'
assigning virtual IP 192.168.2.1 to peer 'strongswan at isuldor.com'
peer requested virtual IP %any6
assigning virtual IP <redacted> to peer 'strongswan at isuldor.com'
...
CHILD_SA moon{4} established with SPIs cba17603_i 0f8dcc81_o and TS 0.0.0.0/0 ::/0 === 192.168.2.1/32
CHILD_SA moon{4} state change: INSTALLING => INSTALLED
generating IKE_AUTH response 1 [ IDr CERT AUTH CPRP(ADDR DNS DNS) SA TSi TSr ]
splitting IKE message (2416 bytes) into 3 fragments
generating IKE_AUTH response 1 [ EF(1/3) ]
generating IKE_AUTH response 1 [ EF(2/3) ]
generating IKE_AUTH response 1 [ EF(3/3) ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[38733] (1236 bytes)
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[38733] (1236 bytes)
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[38733]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[38733] (84 bytes)
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[38733]
checkin IKE_SA rw-isuldor[7]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[38733]
checkin of IKE_SA successful
received packet: from X.X.X.X[38733] to Y.Y.Y.Y[4500]
waiting for data on sockets
checkout IKEv2 SA by message with SPIs ce7fea937528e3ca_i 115e7e1303dd7bc4_r
IKE_SA rw-isuldor[7] successfully checked out
received packet: from X.X.X.X[38733] to Y.Y.Y.Y[4500] (80 bytes)
parsed INFORMATIONAL request 2 [ D ]
received DELETE for IKE_SA rw-isuldor[7]
deleting IKE_SA rw-isuldor[7] between Y.Y.Y.Y[moon.isuldor.com]...X.X.X.X[strongswan at isuldor.com]
IKE_SA rw-isuldor[7] state change: ESTABLISHED => DELETING
IKE_SA deleted
generating INFORMATIONAL response 2 [ ]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[38733] (80 bytes)
checkin and destroy IKE_SA rw-isuldor[7]
sending packet: from Y.Y.Y.Y[4500] to X.X.X.X[38733]
IKE_SA rw-isuldor[7] state change: DELETING => DESTROYING
CHILD_SA moon{4} state change: INSTALLED => DESTROYING
deleting policy 0.0.0.0/0 === 192.168.2.1/32 out
deleting policy 192.168.2.1/32 === 0.0.0.0/0 in
deleting policy 192.168.2.1/32 === 0.0.0.0/0 fwd
deleting SAD entry with SPI cba17603
deleted SAD entry with SPI cba17603
deleting SAD entry with SPI 0f8dcc81
deleted SAD entry with SPI 0f8dcc81
lease 192.168.2.1 by 'strongswan at isuldor.com' went offline
checkin and destroy of IKE_SA successful

更新:一旦我检索到 android 日志,问题就会立即显现出来。基本上我曾经adb shell访问过设备,然后logcat使用适当的过滤器。可能有终端应用程序也可以做到这一点。不需要根。

130|sargo:/ $ whoami
shell
130|sargo:/ $ logcat *:S IkeV2VpnRunner:V
--------- beginning of system
--------- beginning of main
[..] IkeV2VpnRunner: com.android.internal.net.ipsec.ike.exceptions.AuthenticationFailedException: Expected the remote/server to use PSK-based authentication but they used: 14

结论: swanctl 配置文件应该auth=psk在该local部分下和一个附加行为服务器分配预共享密钥,例如:id_moon = moon.isuldor.com在secrets.ike-isuldor. 这仅适用于 strongswan swanctl 5.9.0,但到目前为止,我无法使用早期版本重现成功5.7.2。我怀疑语法可能以某种方式发生了变化。但最终的问题是不正确的服务器身份验证。

linux ipsec ipv6 strongswan android
  • 1 个回答
  • 1527 Views
Martin Hope
blee
Asked: 2015-04-30 11:44:00 +0800 CST

使用外部 SASL 身份验证编辑 OpenLDAP cn=config 的访问权限不足

  • 0

我想将架构添加到我继承的 OpenLDAP 数据库中。

ldapadd -vY EXTERNAL -H ldapi:/// -f schema.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
...
adding new entry "cn=openssh-lpk,cn=schema,cn=config"
ldap_add: Insufficient access (50)

邮件列表上关于相同外部 SASL 身份验证问题的讨论让我相信我需要“将 SASL 外部身份映射到cn=configrootdn”。我将如何做到这一点?

在试图解决这个问题时,我创建了一个类似的 VM 并从 Ubuntu 存储库安装了 slapd。像上面这样的外部 SASL 请求开箱即用。我试图比较cn=config两个系统之间的设置,但未能确定任何明显的线索来执行此任务。生产数据库最初是在 Gentoo 上运行的。我将它迁移到 Ubuntu,并且一直在愉快地编辑帐户并使用它。cn=config但是,自从在迁移期间转换为格式后,我一直无法修改配置数据库。

ubuntu
  • 1 个回答
  • 4653 Views
Martin Hope
blee
Asked: 2013-07-10 02:13:13 +0800 CST

系统错误 1240 在 Server 2008 上安装网络共享

  • 0

我想在私有 LAN 上共享一个来自独立 Server 2012 系统的文件夹,其他服务器无需身份验证即可访问该文件夹。我的环境中没有域/AD。这通常是一个简单的过程,只需以下 3 个步骤即可完成:

  • 启用访客帐户
  • 共享一个同时设置为允许匿名登录的共享和系统权限的文件夹
  • 将共享名称添加到Network access: Shares that can be accessed anonymously

我的共享文件夹在其他 Server 2003 和 Server 2012 系统上安装得非常好。当我尝试在 Server 2008 R2 SP1 系统上挂载共享文件夹时出现以下错误:

net use * \\192.168.1.1\DeploymentShare$ /user:anyusername
System error 1240 has occurred.
The account is not authorized to log in from this station.

这个错误有一个technet解释:

如果非 Microsoft SMB 服务器在身份验证期间仅支持未加密(纯文本)密码,则可能会出现此问题。

这解释了问题所在,但现在我该如何解决呢?

windows-server-2008-r2
  • 1 个回答
  • 4530 Views
Martin Hope
blee
Asked: 2013-04-09 23:10:08 +0800 CST

PowerEdge CS24-VSS 的 BIOS 更新

  • 1

我们有一些不能运行 Windows Server 2008 的PowerEdge CS24服务器。安装程序和克隆的映像都会在启动时迅速出现 BSOD 并出现错误The BIOS in this system is not fully ACPI compliant。我注意到那些确实有效的有更新的 bios 版本。所以我开始为这些服务器寻找 bios 固件更新。

在此处输入图像描述

首先查看主板的特定型号,但我没有找到。在 Google 上进行搜索,结果是PowerEdge C1100的 Dell 手册,上面写着Regulatory Model: CS24-TY. 为该系统(Red Hat 版本)提供的 bios 更新失败,但至少返回了一条可能有用的错误消息:

Your system: CS24-VSS

在戴尔网站或谷歌上进一步搜索“Poweredge CS24-VSS”没有得到有用的结果。我什至无法找到我们已有的两个固件版本:S29S3A03或S29S3A10.

AMIBIOS 显示版本信息,但不显示有关主板的任何其他信息:

AMIBIOS CS24-VSS L5420

我使用戴尔支持上的服务标签找到一篇文章,内容如下:

Currently, there is no online documentation for your selected product.

我应该去哪里找到 PowerEdge CS24-VSS 的 bios 固件更新?

我在其中一台机器上安装了 CentOS 5 以运行 Dell Server Update Utility 5.5 版,但它未能检测到任何已知设备,并且服务器日志包含诸如this is not a Dell Machine之类的消息。

任何已知设备

[root@centos ~]# getSystemId
Libsmbios version:      2.2.27
Product Name:           CS24-VSS
Vendor:                 Dell
BIOS Version:           S29S3A03
System ID:              Traceback (most recent call last):
  File "/usr/sbin/getSystemId", line 124, in ?
    sys.exit( main() )
  File "/usr/sbin/getSystemId", line 106, in main
    sys.stdout.write( "%s\n" % info[1]() )
  File "/usr/sbin/getSystemId", line 52, in get_system_id
    return "0x%04X" % sysinfo.get_dell_system_id()
  File "<libsmbios_c._peak_util_decorators.rewrap wrapping libsmbios_c._common._errorOnZeroFN at 0x09680614>", line 3, in _errorOnZeroFN
  File "/usr/lib/python2.4/site-packages/libsmbios_c/trace_decorator.py", line 108, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.4/site-packages/libsmbios_c/_common.py", line 57, in _errorOnZeroFN
    _doExc(exception_fn, result, func, args, _("function returned error value of zero") )
  File "/usr/lib/python2.4/site-packages/libsmbios_c/_common.py", line 26, in _doExc
    raise exception_fn(r, f, a)
Exception: Could not determine System ID.

在这一点上似乎是死胡同。

windows-server-2008
  • 3 个回答
  • 1751 Views
Martin Hope
blee
Asked: 2012-08-28 00:05:35 +0800 CST

将英文 Windows 2003 更改为中文

  • 1

我想换一台Windows 2003 32位的服务器,让所有的界面/菜单/对话框都显示中文。我尝试设置区域和语言选项以将标准格式设置为中文。我尝试将位置设置为中国,还添加了中文的 IME 输入设置。操作系统仍然显示英文菜单,即使在重新启动后也是如此。

在 Windows 7 上,我认为这是通过 Windows 更新安装语言包来实现的。不过,我找不到适用于 Windows 2003 的等效语言包。

windows-server-2003
  • 1 个回答
  • 3292 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