resolv.confは毎回上書きされます。

resolv.confは毎回上書きされます。

わかります

drwxrwxr-x 3 root tunnel 100 date and time .
drwxr-xr-x 33 root root 860 date and time …
-rwxrwxr-x 1 root tunnel 0 date and time enable-updates
drwxrwxr-x 2 root tunnel 40 date and time interface
-rwxrwxr-x 1 root tunnel 151 date and time resolv.conf

だから私は走る

sudo chown --recursive root:tunnel run/resolvconf
sudo chmod --recursive 775 /run/resolvconf

それから私は理解しました

drwxrwxr-x 3 root tunnel 100 date and time .
drwxr-xr-x 33 root root 860 date and time …
-rwxrwxr-x 1 root tunnel 0 date and time enable-updates
drwxrwxr-x 2 root tunnel 40 date and time interface
-rwxrwxr-x 1 root tunnel 151 date and time resolv.conf

ただし、数秒または再起動すると、すべてのフラグとファイルresolv.confが上書きされ、このメッセージが再表示されます。

ls -al /run/resolvconf
total 4
drwxrwxr-x  3 root tunnel 100 date and time .
drwxr-xr-x 33 root root   860 date and time ..
-rw-r--r--  1 root root     0 date and time enable-updates
drwxrwxr-x  2 root tunnel  40 date and time interface
-rw-r--r--  1 root root   151 date and time resolv.conf

チャットできません。

chattr: Operation not supported while reading flags on /etc/resolv.conf

これはresolv.confの猫です。

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN

ベストアンサー1

作成したとおり、resolv.confファイルは、ネットワーク管理者の悪魔が起動または再起動されるたびに上書きされます。

静的DNSを維持するには、/etc/network/interfacesファイルに次の行を追加する必要があります。

dns-nameservers xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx

xxxx.xxxx.xxxx.xxxxこの例では、IPアドレスを目的のDNSに置き換える必要があります。8.8.8.8Google8.8.4.4のDNSの例があります。

挨拶、

おすすめ記事