开发者

How to find DNS servers for each PPP session in linux? [closed]

开发者 https://www.devze.com 2023-04-11 20:20 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

How to get the DNS server address which are specific to each ppp session. For example, I have to ppp sessions each one connected different service provider, how do I find out the DNS server IP address which are assigned by each service provider? In general, the /etc/ppp/resolv.conf file will be overwritten with the new DNS IP address whenever a new ppp 开发者_如何学运维session is established. Is there any way how we can maintain separate files for DNS servers for each service provider?


ppp comes with scripts to update resolv.conf for you. Look at /etc/ppp/ip-up and /etc/ppp/ip-up.d/0dns-up. The last one has the rules for updating the resolv.conf file. ($DNS1 and $DNS2 variables).

You can add an ip-up.d script if you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消