具有雙網路介面的 Ubuntu 客戶作業系統重設 resolv.conf

具有雙網路介面的 Ubuntu 客戶作業系統重設 resolv.conf

我在 VMWare 工作站上有一個 Ubuntu 10.10 來賓作業系統,具有兩個網路介面。其中一個介面與實體介面橋接並使用 dhcp。另一個是僅主機並使用靜態 IP。我已將 /etc/interfaces 設定為如下所示:

//lo def here

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 192.168.79.128
gateway 192.168.79.1
netmask 255.255.255.0

和/etc/resolv.conf:

nameserver 192.168.3.5
nameserver 192.168.3.50
domain host.com
search host.com

現在它工作了一段時間,然後 dhclient(我認為)覆蓋 resolv.conf 並設定單一名稱伺服器 192.168.79.1。我已經殺死了 nm-applet,所以我知道這不是 POS 造成的阻礙。我也嘗試過編輯 /etc/dhcp3/dhclient.conf,但無濟於事:

supersede domain-name-servers 192.168.3.5,192.168.3.50

我已經進行了一些谷歌搜索,但沒有找到可行的解決方案。有人想出解決這個問題的方法嗎?

答案1

您好,它的網路管理員正在重寫您的 resolv.conf。如果您可以在沒有網頁管理員的情況下生活,那麼我建議將其刪除,另一種方法是使 resolv.conf 只讀(編輯後)

相關內容