You are not logged in.

#1 2007-10-17 23:11:30

krishnarao
Member
Registered: 2007-05-19
Posts: 33

DNS servers not updated after wvdial

I'm using a Huawei 3G Mobile Broadband card which works flawlessly with kppp. However when I use wvdial to set the connection up, the DNS servers are not updated.
Here's my wvdial.conf
[Dialer Defaults]
Init2 = AT+CGDCONT=1,"IP","general.t-mobile.uk"
Modem Type = Analog Modem
Stupid Mode = 1
Phone = *99#
ISDN = 0
Username = user
Init1 = ATZ
Password = wap
Modem = /dev/ttyUSB0
Baud = 460800
Check DNS = 1
Check Def Route = 1
Please help??

Offline

#2 2007-10-18 22:45:48

krishnarao
Member
Registered: 2007-05-19
Posts: 33

Re: DNS servers not updated after wvdial

I've just realized that wvdial places the detected DNS servers in /etc/ppp/resolv.conf and not in /etc/resolv.conf. How can I ensure that the DNS servers are added to /etc/resolv.conf instead?

Offline

#3 2007-10-19 12:24:43

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: DNS servers not updated after wvdial

under root :
cd /etc
rm resolv.conf
ln -s /etc/ppp/resolv.conf

Offline

#4 2007-10-20 12:22:39

krishnarao
Member
Registered: 2007-05-19
Posts: 33

Re: DNS servers not updated after wvdial

Is there anyway to make wvdial add the DNS servers in /etc/resolv.conf instead of /etc/ppp/resolv.conf. I don't want to create a symlink every time. How can one pipe the output onto the begining of a file (>> only pipes to the end of a file)

Offline

#5 2007-10-20 12:56:00

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: DNS servers not updated after wvdial

What do you mean "to create a symlink every time" ?
You create it just once, I suppose ; or is the symlink erased at each connexion ?
"How can one pipe the output onto the begining of a file"
The output of what and to what file ? I don't understand what you are asking for exactly.

Offline

#6 2007-10-20 13:19:00

krishnarao
Member
Registered: 2007-05-19
Posts: 33

Re: DNS servers not updated after wvdial

I would like to create a script which reads the /etc/ppp/resolv.conf and pipes the input on to the begining of /etc/resolv.conf just the way kppp does.
If I use cat /etc/ppp/resolv.conf >> /etc/resolv.conf the output will go to the end of /etc/resolv.conf

Offline

#7 2007-10-20 17:44:04

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: DNS servers not updated after wvdial

cat /etc/ppp/resolv.conf  /etc/resolv.conf > /etc/resolv.temp
rm /etc/resolv.conf
mv /etc/resolv.temp /etc/resolv.conf

But if you do that at each connexion, it seems to me that the '/etc/resolv.conf' will get bigger and bigger.

What is the problem exactly with the symlink ? Can you tell what bothers you with that ?

Last edited by berbae (2007-10-20 21:08:04)

Offline

#8 2007-10-21 21:17:30

krishnarao
Member
Registered: 2007-05-19
Posts: 33

Re: DNS servers not updated after wvdial

I created the symlink from /etc/resolv.conf to /etc/ppp/resolv.conf as you specified and it still did not work. I'm unable to figure out why I'm not connected despite a successful ppp negotiation.

Offline

#9 2007-10-22 15:30:20

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: DNS servers not updated after wvdial

Can you post the output of the command to connect to the internet and after a connexion the output of :
cat /etc/resolv.conf
and
ping archlinux.org
ping google.com

Offline

Board footer

Powered by FluxBB