Install dnsmasq In Ubuntu. Run the following command: sudoapt-getinstalldnsmasq to edit the configuration file of dnsmasq: sudogedit/etc/dnsmasq. conf: # resolv-file = replace it with the following statement: resolv-file =/etc/resolv. dnsmasq. conf and then execute the command to/etc/resolv
Run the following command to install dnsmasq in Ubuntu:
Sudo apt-get install dnsmasq
Edit the configuration file of dnsmasq with the following command:
Sudo gedit/etc/dnsmasq. conf
Find the following item:
# Resolv-file =
Replace the following statement:
Resolv-file =/etc/resolv. dnsmasq. conf
Then run the command to create resolv. dnsmasq. conf with a copy of/etc/resolv. conf:
Sudo cp/etc/resolv. conf/etc/resolv. dnsmasq. conf
Edit resolv. conf and run the following command:
Sudo gedit/etc/resolv. conf
Comment out all the domain name servers and add the following lines
Nameserver 127.0.0.1
Save and exit. Run the following command:
Sudo gedit/etc/ppp/peers/wvdial
Add # Before usepeerdns, that is, overwrite this statement. Prevent resolv. conf from being overwritten by pppoe.
Restart.