I've 2 linux computers, one redhat (client), and one ubuntu (set up with shared internet connection as described here)

At the moment, on the wired connection between the computers, I can ping the other computer from both sides; IP addresses are setup statically. The ubuntu computer has access to the internet through wireless.

I want to setup the redhat client to be able to access the same DNS server as the ubuntu one uses. In the article above, it is assumed that the client is another ubuntu box, and they advise to do the following:

prepend domain-name-servers,;

However, the redhat client doesn't have the file /etc/dhcp3/dhclient.conf. Is there another way of achieving the above in redhat?

(I've tried to setup the ubuntu box as a dhcp server using dnsmasq, but it didn't work)

(BTW, I thought I needed a crossover cable for this type of setup, but that didn't work - an ordinary ethernet cable was fine)

  • On the crossover cable issue: years ago, only high-end networking equipment did the crossing over for you. Nowadays, I think all Ethernet cards and all switches automatically cross over if needed. – Gilles 'SO- stop being evil' Oct 14 '10 at 18:47

DNS servers are specified in all Linux distribution in the file /etc/resolv.conf it should contain:


for your servers. However, when using dynamic network setup instead of static, the setup tool used might overwrite this.

It's not clear which version of RedHat you use, so I've got to shoot in the dark a bit, but if you have system-config-network, this is probably the right tool to use for network configuration. More modern systems normally use network-manager.

  • 1
    And usually on rpm based systems you can specify the DNS servers in the eth config files, too (/etc/sysconfig/network-script/ifcfg-eth0 for example). It depends on your version of Linux, but it should work. In ifcfg-ethX you specify DNS1 = and DNS2 =.... This works at least on Mandriva and it may work on RedHat/Fedora, too, but I'm not sure. – Patkos Csaba Oct 15 '10 at 6:41

I hadn't set up NAT on the ubuntu server.

When that was set up I didn't need any 'prepend' stuff as I was able to set the IP address of the DNS server on the client (redhat, in resolv.conf) to be the same IP address as the ubuntu server was using. NAT handled the translation from one network to the other.

The instructions for setting up NAT on the ubuntu server I got from here:


Thanks fschmitt for your answer.


Redhat also uses client config file:

$ man dhclient

The DHCP client normally gets its configuration information from /etc/dhclient.conf

That file by default is not created, so you can copy the following sample file and edit to suite you need. My client ver is 3.0.5, so the file path is:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.