manually set dns server address

Asked by trav

Hi. I am a super newbie to the linux world and I just installed ubuntu edgy eft on my laptop. I am connected to the internet through verizon dsl. I have an actiontec gt704wgv gateway. I had problems losing connection after awhile and verizon helped me fix the problem in windoze by manually setting the dns server address. I dont see any where to do this in ubuntu. I also wondered if the ndiswrapper is the best way to get my linksys wifi card to work. Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Alan Pope 🍺🐧🐱 🦄
Solved:
Last query:
Last reply:
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#1

Generally speaking your router/gateway should get an IP address from your ISP. With that it should get the DNS servers addresses. Most then run DHCP to the internal network and tell the clients (your pc) the DNS servers to use, and to use the router as the default gateway. If this isn't working properly then you can set the DNS servers in the file /etc/resolv.conf. Edit this using the following:-

$ sudo gedit /etc/resolv.conf

Then make sure there is an entry for each nameserver in the format below

nameserver <ip address of nameserver 1>
nameserver <ip address of nameserver 2>

Revision history for this message
Ubuntu User (anotherubuntuuser) said :
#2

If these comments solved your problem, please consider closing this request as answered. You can find useful information on managing your support requests here:
https://wiki.ubuntu.com/SupportRequests

If you are still having problems, let us know and we'll keep working on them.

Thanks-

Jim Jones

Revision history for this message
Alan Chortie (alco716) said :
#3

On Mon, 2006-10-30 at 22:34 +0000, Jim Jones wrote:

Support request #2248 on Ubuntu changed:
https://launchpad.net/distros/ubuntu/+ticket/2248

HI Jim;

The information on how to set up and use the DSL connection worked real
good,, my issue now is how to SAVE it to Open at start up ..

sorry about not closing my post this is my first time on LINUX / Ubuntu

as I am a "recovering windows user" and am only 7 days into not having
any of gate-itis in my system...

so my next question is Can I save the commands to open on start-up and
go online..

I am really liking the Ubuntu..

Al Chotrie
North of Buffalo , NY
Not shoveling ,,,yet

Revision history for this message
Nicolas DERIVE (kalon33) said :
#4

When you have save it one time in the file, if your DNS servers don't change, it will work automatically on startup.

To close your support request : Go on the launchpad page of your support request, click at the bottom of the page on "Add comment" and check the box "support request is answered" under your comment.

Revision history for this message
trav (travisshrewsbury) said :
#5

Its like people are reading my mind. I am having an issue where mine keep resetting to the gateway's ip address. I have changed the dns server address' in my gateway and can get online for a while after rebooting but eventually it goes out. When I check the file /etc/resolv.conf this is what it keeps showing

search domain_not_set.invalid
nameserver 192.168.1.1
nameserver 192.168.1.1

After I lose connection if I change them it works fine until I reboot.

Thanks-
Travis

Revision history for this message
trav (travisshrewsbury) said :
#6

I have fixed it by setting a static ip address. My router does not change it.

Revision history for this message
Alan Chortie (alco716) said :
#7

The internet connection was working fine, until all of the sudden at one point I tried to use the dsl through the terminal and this came up:
In file/etc/ppp/peers/dsl-provider: unrecognized option 'nic-eth0--configure--configure'
I've tried to edit this, but it won't let me.
Please help, Thanx! :)

Revision history for this message
gnuskool (gnuskool) said :
#8

revoke write permissions to /etc/resolv.conf sudo chmod 444 /etc/resolv.conf

OR check post 13 here http://ubuntuforums.org/showthread.php?t=128254&page=2

Revision history for this message
quincywalltech (quincywalltech) said :
#9

Oh now lets choose some DNS servers.

Pick one from http://www.DNSServerList.org

Revision history for this message
archon256 (saskotomas) said :
#10

I realised that my router was resetting the DNS to the wrong 192.168.1.1 every 10 seconds and even if I wrote via Network Settings (KDE) or directly into resolv.conf to use an alternative good one (194.72.6.51) after 10 seconds it got overwritten again to the 192.168.1.1 I was getting desperate and furious. Windows machines kept the alternate DNS in IP configuration without problems.
Then I found out (through a OpenSuse Live CD and YAST configuration) that to turn off the setting DNS via DHCP I had to change the resolv.conf instead of

search -name-
nameserver 192.168.1.1

to

domain site
nameserver 192.168.1.1
nameserver 194.72.6.51

That helped, since then the DNS stays as it should and my internet is working 100%

Revision history for this message
bluebell (ramanujwrites) said :
#11

i tried out all these that are suggested here, but i cant manually set my dns because after saving the changed /etc/resolv.conf file it seems to be immediately overwritten. i am a newbie, there is a possibility that i am missing something. any advice?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#12

@bluebell

Please don't append a new question on a already answered or marked as solved question.
Please make new question from here: https://answers.launchpad.net/ubuntu/+addquestion
you will get better chance to get right answer on a fresh tagged "open" question.
Solved or answered questions are usually not read from answering people.

Thank you

Revision history for this message
bluebell (ramanujwrites) said :
#13

sorry i didnt know i shad not ask new questions on already answered threads. btw, i have been able to fix the problem.