启动 Ubuntu 18.10 后,我无法解析域名,我的/etc/resolv.conf
文件如下所示:
# Generated by NetworkManager
nameserver 127.0.0.53
该$ nslookup google.com - 127.0.0.53
命令也没有返回任何内容。
在 OpenVPN 中安装此脚本以支持 DNS 后,这成为一个问题:https ://github.com/masterkorp/openvpn-update-resolv-conf
我想我已经安装了该openresolv
软件包,但我不确定如何配置所有内容以协同工作。
现在,我只需要在/etc/resolv.conf
每次启动后手动更新 Google DNS 服务器。但是,VPN 工作正常,所以看起来它正在为此更新 DNS。
在重新启动 PC 并使用 OpenVPN 建立 VPN 隧道后,可以做些什么来使其工作?
任何建议将不胜感激。
@heynnema 请求的命令:
我在重新启动后运行它们,然后连接到 VPN。
$ cat /etc/issue
Ubuntu 18.10
$ uname -a
Linux destiny 4.18.0-13-generic #14-Ubuntu SMP Wed Dec 5 09:04:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ ls -al /etc/resolv.conf
-rw-r--r-- 1 root root 52 янв 21 21:20 /etc/resolv.conf
$ ps auxc | grep -i dns
$ host 8.8.8.8
;; connection timed out; no servers could be reached
$ host www.ebay.com
;; connection timed out; no servers could be reached
$ ps auxc | grep -i resolv
$ cat /run/resolvconf/resolv.conf
cat: /run/resolvconf/resolv.conf: No such file or directory
$ cat /run/systemd/resolve/resolv.conf
cat: /run/systemd/resolve/resolv.conf: No such file or directory
$ ls -al /etc/openvpn
total 36
drwxr-xr-x 5 root root 4096 янв 15 14:54 .
drwxr-xr-x 139 root root 12288 янв 21 23:43 ..
drwxr-xr-x 2 root root 4096 сен 3 11:57 client
drwxr-xr-x 2 root root 4096 янв 15 14:25 scripts
drwxr-xr-x 2 root root 4096 сен 3 11:57 server
-rwxr-xr-x 1 root root 1468 сен 3 11:57 update-resolv-conf
-rwxr-xr-x 1 root root 2152 янв 15 14:54 update-resolv-conf.sh
# openvpn --version
OpenVPN 2.4.6 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 3 2018
library versions: OpenSSL 1.1.1 11 Sep 2018, LZO 2.10
Originally developed by James Yonan
Copyright (C) 2002-2018 OpenVPN Inc <[email protected]>
Compile time defines: enable_async_push=no enable_comp_stub=no enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dependency_tracking=no enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=needless enable_fragment=yes enable_iproute2=yes enable_libtool_lock=yes enable_lz4=yes enable_lzo=yes enable_maintainer_mode=no enable_management=yes enable_multihome=yes enable_pam_dlopen=no enable_pedantic=no enable_pf=yes enable_pkcs11=yes enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_silent_rules=no enable_small=no enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=yes enable_werror=no enable_win32_dll=yes enable_x509_alt_username=yes with_aix_soname=aix with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_sysroot=no
$ systemctl status | head -n 6
● destiny
State: running
Jobs: 0 queued
Failed: 0 units
Since: Tue 2019-01-22 17:33:01 MSK; 1min 29s ago
CGroup: /
$ systemctl status systemd-resolved
● systemd-resolved.service - Network Name Resolution
Loaded: loaded (/lib/systemd/system/systemd-resolved.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-resolved.service(8)
https://www.freedesktop.org/wiki/Software/systemd/resolved
https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients