server CLI how to fix dns resolution,proxy and to static IP

Tom H tomh0665 at gmail.com
Fri Jun 15 00:11:25 UTC 2012


On Thu, Jun 14, 2012 at 5:57 PM, Rajeev Prasad <rp.neuli at yahoo.com> wrote:
> From: Tom H <tomh0665 at gmail.com>
> Sent: Wednesday, June 13, 2012 2:55 AM
> On Tue, Jun 12, 2012 at 7:28 PM, Rajeev Prasad <rp.neuli at yahoo.com> wrote:
>>>
>>> i checked on web but the solutions are for GUI. i have this fresh server
>>> install, which is getting its IP and DNS from DHCP. I want to put my own
>>> DNS server and keep getting the IP from DHCP.
>>
>> If you mean that you want to set up a dns server and have its address
>> pushed to dhcp clients then add a "option domain-name-servers
>> ip-address-of-your-dns-server;" line to "/etc/dhcp/dhcpd.conf" on your
>> dhcp server.
>>>
>>> also later on i want to put an static IP and do not want DHCP
>>> server/client on the box how to do that migration?
>>
>> Edit "/etc/network/interfaces" and "/etc/resolv.conf" on your server.
>
> sorry for confusion. no i do not want to host dns server, i want to have
> static IP for my host and hardcoded DNS servers for resolution (resolv.conf)
> editing resolv.conf by hand is not allowed in 1204
> i will certainly read the manual. but i think these are very basic things on
> an OS and they should be made (and advertised) in simple and straightforward
> manner. my ultimate goal is not to fight with making my server resolve
> names, go past proxy have fix IP or install apps. i have to develop useful
> content and deploy on the server using the apps which are built for it.

Please bottom-post!

They are very simple. You just have to read the manual or understand
the answers to your question. You CAN edit "/etc/resolv.conf" on any
version of Linux. If you're using dhcp, it'll most likely be be
overwritten. Please check your facts before posting.

If you're running your own dhcp server, you can propagate dns settings
via an "option domain-name-servers ip-address-of-dns-server;" line in
"/etc/dncp/dhcpd.conf".

If you're not running you own dhcp server and aren't using Network
Manager, you can set the dns server(s) with a "supersede
domain-name-servers ip-address-of-dns-server;" line in
"/etc/dhcp/dhclient.conf". (You might be able to remove
"domain-name-servers" from the "request" line and set
"/etc/resolv.conf" by hand but I've never tried it.)

If you're not running you own dhcp server and are using Network
Manager, you can set the dns server(s) with something in
"/etc/NetworkManager/dispatcher.d" but I have no idea how or what.

If you're using static ip settings, you have to assign the ip address
in "/etc/network/interfaces" and the dns server in "/etc/resolv.conf".




More information about the ubuntu-users mailing list