PDA

View Full Version : how to configure DNS for WLAN-card ath0



HeinzW
09-25-2005, 10:35 AM
Hi,

how can I set a DNS server for my WLAN card (ath0) ?

I've successfully managed to set an IP-address with "ifconfig ath0 ...." and have added a default GW, too.
But how could I set a DNS for ath0 ?

With "netcardconfig" it seems I can only set DNS for eth0 - but not for my WLAN-adapter ?
(I have checked "iwconfig", but seems there is no option for setting a DNS there?)

thank you
Heinz

UnderScore
09-26-2005, 07:39 PM
Edit the netcardconfig script:
sudo kwrite /usr/sbin/netcardconfig

Find this line:
NETDEVICES="$(cat /proc/net/dev | awk -F: '/eth.:|tr.:|wlan.:/{print $1}')"

Add ath.:| after the |
NETDEVICES="$(cat /proc/net/dev | awk -F: '/eth.:|ath.:||tr.:|wlan.:/{print $1}')"
Save the changes and exit Kwrite.

Then run netcardconfig:
netcardconfig

Choose the ath0 device and use DHCP. It should be successful.
Then check to see if it grabbed an IP Address:
ifconfig