can I manually assign DNS server name with wpa_supplicant?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am trying to run a Raspberrypi as a routing machine. It will be connected to wifi with wpa_supplicant.



My PC ----> Raspberry Pi ----> Wifi Router



The thing is I noticed, the RPi got from the wifi router a dynamic DNS name, which is 192.168.10.1. On my PC, I can ping 8.8.8.8, but I cannot resolve name. I have to manually change the /etc/resolv.conf so that it uses the google DNS server, then I will have internet.



my PC got the DNS server from the RPi.



nmcli dev show | grep DNS gives:

IP4.DNS[1]: 192.168.10.1


This IP is under another sub net, my PC will not able to recognize it. So what can I do? The solution I thought is to assign the DNS server while connecting with wpa_supplicant. Can I do it?







share|improve this question




















  • If you are getting DHCP then it should include a valid DNS server, check your DHCP server's config.
    – ivanivan
    Mar 6 at 14:59










  • @ivanivan Hi. the udhcpd.conf has option dns 8.8.8.8, so it looks fine. Actually all these happen after the RPi connect with the wifi router. From that moment all the dns server name become 192.168.10.1, like virus
    – J.R.
    Mar 6 at 15:03










  • Not the DNS server on the Pi, but the DNS server being sent via wherever it is getting its DHCP from. Do dhclient -v wlan0 (or whatever your device name is) and see where it is getting the info from
    – ivanivan
    Mar 6 at 15:11










  • @ivanivan Hi, I changed the udhcpc setting on my PC and gives it static dns server of 8.8.8.8. It still does not work...under /etc/resolv.conf there's only "nameserver 127.0.1.1". It seems something is in-correct with the wpa_supplicant.
    – J.R.
    Mar 6 at 15:33










  • wpa_supplicant has nothing to do with DNS, it only handles your wifi and encryption. DNS configuration is typically handled through DHCP. You need to adjust your DHCP server configuration on the pi.
    – smokes2345
    Mar 6 at 19:49














up vote
0
down vote

favorite












I am trying to run a Raspberrypi as a routing machine. It will be connected to wifi with wpa_supplicant.



My PC ----> Raspberry Pi ----> Wifi Router



The thing is I noticed, the RPi got from the wifi router a dynamic DNS name, which is 192.168.10.1. On my PC, I can ping 8.8.8.8, but I cannot resolve name. I have to manually change the /etc/resolv.conf so that it uses the google DNS server, then I will have internet.



my PC got the DNS server from the RPi.



nmcli dev show | grep DNS gives:

IP4.DNS[1]: 192.168.10.1


This IP is under another sub net, my PC will not able to recognize it. So what can I do? The solution I thought is to assign the DNS server while connecting with wpa_supplicant. Can I do it?







share|improve this question




















  • If you are getting DHCP then it should include a valid DNS server, check your DHCP server's config.
    – ivanivan
    Mar 6 at 14:59










  • @ivanivan Hi. the udhcpd.conf has option dns 8.8.8.8, so it looks fine. Actually all these happen after the RPi connect with the wifi router. From that moment all the dns server name become 192.168.10.1, like virus
    – J.R.
    Mar 6 at 15:03










  • Not the DNS server on the Pi, but the DNS server being sent via wherever it is getting its DHCP from. Do dhclient -v wlan0 (or whatever your device name is) and see where it is getting the info from
    – ivanivan
    Mar 6 at 15:11










  • @ivanivan Hi, I changed the udhcpc setting on my PC and gives it static dns server of 8.8.8.8. It still does not work...under /etc/resolv.conf there's only "nameserver 127.0.1.1". It seems something is in-correct with the wpa_supplicant.
    – J.R.
    Mar 6 at 15:33










  • wpa_supplicant has nothing to do with DNS, it only handles your wifi and encryption. DNS configuration is typically handled through DHCP. You need to adjust your DHCP server configuration on the pi.
    – smokes2345
    Mar 6 at 19:49












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to run a Raspberrypi as a routing machine. It will be connected to wifi with wpa_supplicant.



My PC ----> Raspberry Pi ----> Wifi Router



The thing is I noticed, the RPi got from the wifi router a dynamic DNS name, which is 192.168.10.1. On my PC, I can ping 8.8.8.8, but I cannot resolve name. I have to manually change the /etc/resolv.conf so that it uses the google DNS server, then I will have internet.



my PC got the DNS server from the RPi.



nmcli dev show | grep DNS gives:

IP4.DNS[1]: 192.168.10.1


This IP is under another sub net, my PC will not able to recognize it. So what can I do? The solution I thought is to assign the DNS server while connecting with wpa_supplicant. Can I do it?







share|improve this question












I am trying to run a Raspberrypi as a routing machine. It will be connected to wifi with wpa_supplicant.



My PC ----> Raspberry Pi ----> Wifi Router



The thing is I noticed, the RPi got from the wifi router a dynamic DNS name, which is 192.168.10.1. On my PC, I can ping 8.8.8.8, but I cannot resolve name. I have to manually change the /etc/resolv.conf so that it uses the google DNS server, then I will have internet.



my PC got the DNS server from the RPi.



nmcli dev show | grep DNS gives:

IP4.DNS[1]: 192.168.10.1


This IP is under another sub net, my PC will not able to recognize it. So what can I do? The solution I thought is to assign the DNS server while connecting with wpa_supplicant. Can I do it?









share|improve this question











share|improve this question




share|improve this question










asked Mar 6 at 14:40









J.R.

177




177











  • If you are getting DHCP then it should include a valid DNS server, check your DHCP server's config.
    – ivanivan
    Mar 6 at 14:59










  • @ivanivan Hi. the udhcpd.conf has option dns 8.8.8.8, so it looks fine. Actually all these happen after the RPi connect with the wifi router. From that moment all the dns server name become 192.168.10.1, like virus
    – J.R.
    Mar 6 at 15:03










  • Not the DNS server on the Pi, but the DNS server being sent via wherever it is getting its DHCP from. Do dhclient -v wlan0 (or whatever your device name is) and see where it is getting the info from
    – ivanivan
    Mar 6 at 15:11










  • @ivanivan Hi, I changed the udhcpc setting on my PC and gives it static dns server of 8.8.8.8. It still does not work...under /etc/resolv.conf there's only "nameserver 127.0.1.1". It seems something is in-correct with the wpa_supplicant.
    – J.R.
    Mar 6 at 15:33










  • wpa_supplicant has nothing to do with DNS, it only handles your wifi and encryption. DNS configuration is typically handled through DHCP. You need to adjust your DHCP server configuration on the pi.
    – smokes2345
    Mar 6 at 19:49
















  • If you are getting DHCP then it should include a valid DNS server, check your DHCP server's config.
    – ivanivan
    Mar 6 at 14:59










  • @ivanivan Hi. the udhcpd.conf has option dns 8.8.8.8, so it looks fine. Actually all these happen after the RPi connect with the wifi router. From that moment all the dns server name become 192.168.10.1, like virus
    – J.R.
    Mar 6 at 15:03










  • Not the DNS server on the Pi, but the DNS server being sent via wherever it is getting its DHCP from. Do dhclient -v wlan0 (or whatever your device name is) and see where it is getting the info from
    – ivanivan
    Mar 6 at 15:11










  • @ivanivan Hi, I changed the udhcpc setting on my PC and gives it static dns server of 8.8.8.8. It still does not work...under /etc/resolv.conf there's only "nameserver 127.0.1.1". It seems something is in-correct with the wpa_supplicant.
    – J.R.
    Mar 6 at 15:33










  • wpa_supplicant has nothing to do with DNS, it only handles your wifi and encryption. DNS configuration is typically handled through DHCP. You need to adjust your DHCP server configuration on the pi.
    – smokes2345
    Mar 6 at 19:49















If you are getting DHCP then it should include a valid DNS server, check your DHCP server's config.
– ivanivan
Mar 6 at 14:59




If you are getting DHCP then it should include a valid DNS server, check your DHCP server's config.
– ivanivan
Mar 6 at 14:59












@ivanivan Hi. the udhcpd.conf has option dns 8.8.8.8, so it looks fine. Actually all these happen after the RPi connect with the wifi router. From that moment all the dns server name become 192.168.10.1, like virus
– J.R.
Mar 6 at 15:03




@ivanivan Hi. the udhcpd.conf has option dns 8.8.8.8, so it looks fine. Actually all these happen after the RPi connect with the wifi router. From that moment all the dns server name become 192.168.10.1, like virus
– J.R.
Mar 6 at 15:03












Not the DNS server on the Pi, but the DNS server being sent via wherever it is getting its DHCP from. Do dhclient -v wlan0 (or whatever your device name is) and see where it is getting the info from
– ivanivan
Mar 6 at 15:11




Not the DNS server on the Pi, but the DNS server being sent via wherever it is getting its DHCP from. Do dhclient -v wlan0 (or whatever your device name is) and see where it is getting the info from
– ivanivan
Mar 6 at 15:11












@ivanivan Hi, I changed the udhcpc setting on my PC and gives it static dns server of 8.8.8.8. It still does not work...under /etc/resolv.conf there's only "nameserver 127.0.1.1". It seems something is in-correct with the wpa_supplicant.
– J.R.
Mar 6 at 15:33




@ivanivan Hi, I changed the udhcpc setting on my PC and gives it static dns server of 8.8.8.8. It still does not work...under /etc/resolv.conf there's only "nameserver 127.0.1.1". It seems something is in-correct with the wpa_supplicant.
– J.R.
Mar 6 at 15:33












wpa_supplicant has nothing to do with DNS, it only handles your wifi and encryption. DNS configuration is typically handled through DHCP. You need to adjust your DHCP server configuration on the pi.
– smokes2345
Mar 6 at 19:49




wpa_supplicant has nothing to do with DNS, it only handles your wifi and encryption. DNS configuration is typically handled through DHCP. You need to adjust your DHCP server configuration on the pi.
– smokes2345
Mar 6 at 19:49















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428524%2fcan-i-manually-assign-dns-server-name-with-wpa-supplicant%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428524%2fcan-i-manually-assign-dns-server-name-with-wpa-supplicant%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay