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
    • 最新
    • 标签
主页 / computer / 问题 / 1716273
Accepted
codezalot
codezalot
Asked: 2022-04-15 05:56:57 +0800 CST2022-04-15 05:56:57 +0800 CST 2022-04-15 05:56:57 +0800 CST

Pop_OS 21.10 上 strongSwan 的 DNS 问题

  • 772

我已strongswan-starter在 Pop!_OS 上安装以连接到我的工作场所。

我首先将它安装在 Ubuntu 上(一切运行良好),但决定切换到 Pop!_OS 21.10。

当我在 Pop!_OS 上连接到 VPN 时,我可以 ping 远程网络,但 DNS 无法正常工作。当我查看时,/etc/resolv.conf我可以看到尚未设置 DNS 名称服务器,所以这显然是 DNS 无法正常工作的原因。

在 Ubuntu 上,我必须resolvconf手动安装,然后重新启动strongswan-starter,然后我可以在/etc/resolv.conf.

在 Pop_OS 上!resolvconf已安装 nativley。重新启动resolvconf.service没有帮助。

有人知道如何让它发挥作用吗?

编辑:

这就是日志所说的(/var/log/syslog):

Apr 19 16:34:12 pop-os systemd[1]: Started strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf.
Apr 19 16:34:12 pop-os ipsec[2925]: Starting strongSwan 5.9.1 IPsec [starter]...
Apr 19 16:34:12 pop-os charon: 00[DMN] Starting IKE charon daemon (strongSwan 5.9.1, Linux 5.16.15-76051615-generic, x86_64)
Apr 19 16:34:12 pop-os charon: 00[CFG] loading ca certificates from '/etc/ipsec.d/cacerts'
Apr 19 16:34:12 pop-os charon: 00[CFG] loading aa certificates from '/etc/ipsec.d/aacerts'
Apr 19 16:34:12 pop-os charon: 00[CFG] loading ocsp signer certificates from '/etc/ipsec.d/ocspcerts'
Apr 19 16:34:12 pop-os charon: 00[CFG] loading attribute certificates from '/etc/ipsec.d/acerts'
Apr 19 16:34:12 pop-os charon: 00[CFG] loading crls from '/etc/ipsec.d/crls'
Apr 19 16:34:12 pop-os charon: 00[CFG] loading secrets from '/etc/ipsec.secrets'
Apr 19 16:34:12 pop-os charon: 00[CFG]   loaded ECDSA private key from '/etc/ipsec.d/private/user.key'
Apr 19 16:34:12 pop-os charon: 00[CFG] loaded 0 RADIUS server configurations
Apr 19 16:34:12 pop-os charon: 00[CFG] HA config misses local/remote address
Apr 19 16:34:12 pop-os charon: 00[LIB] loaded plugins: charon aesni aes rc2 sha2 sha1 md5 mgf1 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem openssl fips-prf gmp agent xcbc hmac gcm drbg attr kernel-netlink resolve socket-default connmark farp stroke updown eap-identity eap-aka eap-md5 eap-gtc eap-mschapv2 eap-dynamic eap-radius eap-tls eap-ttls eap-peap eap-tnc xauth-generic xauth-eap xauth-pam tnc-tnccs dhcp lookip error-notify certexpire led addrblock unity counters
Apr 19 16:34:12 pop-os charon: 00[LIB] dropped capabilities, running as uid 0, gid 0
Apr 19 16:34:12 pop-os charon: 00[JOB] spawning 16 worker threads
Apr 19 16:34:12 pop-os ipsec[2925]: charon (2928) started after 20 ms
Apr 19 16:34:12 pop-os charon: 04[CFG] received stroke: add connection 'roadw'
Apr 19 16:34:12 pop-os charon: 04[CFG]   loaded certificate "CN=user" from 'user.crt'
Apr 19 16:34:12 pop-os charon: 04[CFG]   loaded certificate "CN=rw.vpn.company.ch" from 'rw.vpn.company.ch.cert.pem'
Apr 19 16:34:12 pop-os charon: 04[CFG] added configuration 'roadw'
Apr 19 16:34:12 pop-os charon: 06[CFG] received stroke: route 'roadw'
Apr 19 16:34:12 pop-os ipsec[2925]: 'roadw' routed
Apr 19 16:34:20 pop-os gnome-shell[1540]: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Apr 19 16:34:20 pop-os gnome-shell[1540]: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Apr 19 16:34:20 pop-os gnome-shell[1540]: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Apr 19 16:34:20 pop-os gnome-shell[1540]: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345503cde0 Gjs_pop-cosmic_system76_com_applications_CosmicAppDisplay.cosmic-app-display:insensitive] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345609a8b0 StViewport:insensitive ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345503cde0 Gjs_pop-cosmic_system76_com_applications_CosmicAppDisplay.cosmic-app-display:insensitive] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345609a8b0 StViewport:insensitive ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345068dc40 Gjs_pop-cosmic_system76_com_applications_CosmicFolderButton.app-well-app cosmic-base-folder-button ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345503cde0 Gjs_pop-cosmic_system76_com_applications_CosmicAppDisplay.cosmic-app-display:insensitive] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345609a8b0 StViewport:insensitive ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345068dc40 Gjs_pop-cosmic_system76_com_applications_CosmicFolderButton.app-well-app cosmic-base-folder-button ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x5634503bc420 Gjs_ui_iconGrid_BaseIcon.overview-icon overview-icon-with-label:insensitive ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345503cde0 Gjs_pop-cosmic_system76_com_applications_CosmicAppDisplay.cosmic-app-display:insensitive] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345609a8b0 StViewport:insensitive ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345068dc40 Gjs_pop-cosmic_system76_com_applications_CosmicFolderButton.app-well-app cosmic-base-folder-button ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x5634503bc420 Gjs_ui_iconGrid_BaseIcon.overview-icon overview-icon-with-label:insensitive ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x563451883710 StBoxLayout:insensitive ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345503cde0 Gjs_pop-cosmic_system76_com_applications_CosmicAppDisplay.cosmic-app-display:insensitive] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345609a8b0 StViewport:insensitive ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x56345068dc40 Gjs_pop-cosmic_system76_com_applications_CosmicFolderButton.app-well-app cosmic-base-folder-button ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x5634503bc420 Gjs_ui_iconGrid_BaseIcon.overview-icon overview-icon-with-label:insensitive ("Library Home")] which is not in the stage.
Apr 19 16:34:20 pop-os gnome-shell[1540]: st_widget_get_theme_node called on the widget [0x563451883710 StBoxLayout:insensitive ("Library Home")] which is not in the stage.
...

我假设相关的日志条目是这些,因为这些是第一个失败的(并且它们不会出现在另一个运行具有相同 VPN 配置的 Ubuntu 的系统上):

Apr 19 16:34:20 pop-os gnome-shell[1540]: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Apr 19 16:34:20 pop-os gnome-shell[1540]: cr_declaration_parse_list_from_buf: assertion 'parser' failed
Apr 19 16:34:20 pop-os gnome-shell[1540]: cr_parser_new_from_buf: assertion 'a_buf && a_len' failed
Apr 19 16:34:20 pop-os gnome-shell[1540]: cr_declaration_parse_list_from_buf: assertion 'parser' failed
strongswan pop-os
  • 1 1 个回答
  • 375 Views

1 个回答

  • Voted
  1. Best Answer
    codezalot
    2022-04-20T12:49:53+08:002022-04-20T12:49:53+08:00

    感谢@ecdsa的指点,我能够弄清楚:)

    在阅读日志之前,我必须使用ipsec up roadw.

    然后登录/var/log/syslog显示这些条目:

    Apr 19 22:27:08 pop-os charon: 16[IKE] installing DNS server X.X.X.X via resolvconf
    Apr 19 22:27:08 pop-os charon: 16[IKE] resolvconf: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf
    

    我能够根据AskUbuntu 上的这个线程修复符号链接:

    sudo rm /etc/resolv.conf
    sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf
    sudo resolvconf -u
    

    最后,使用以下命令初始化 strongSwan:

    sudo ipsec up roadw
    

    现在问题已解决,/etc/resolv.conf显示正确的名称服务器和 DNS 正在工作。

    编辑:

    我已经检查了全新安装,显然默认情况下 Pop!_OS/etc/resolv.conf是一个符号链接:

    ../run/systemd/resolve/stub-resolv.conf

    并不是:

    ../run/resolvconf/resolv.conf

    • 0

相关问题

  • Pop OS 20.04 iso 的不同校验和

  • 如何安装 flatpak 程序以使其在系统范围内可用?

  • IPSec nftables strongswan

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve