Score:1

DNS lookup not working when using Ubuntu as an access point

in flag

I have a Ubuntu system with a wired connection to a router, and a USB connection to 4G internet via an iPhone. I want to be able to connect other clients to the router and access the internet via the 4G link. I have followed the steps here iptables forwarding between two interface and it is successfully routing ping requests and seems to connect to sites provided I use the IP address of the site rather than the 'name'. Where I am lost is that once I connect to the router, and use nslookup with the DNS server on the 4G, the correct result is returned, however it can't seem to do that without explicitly giving the server address. I have set this server as the DNS server in the router, and also tried setting it on the client, but neither work. Does anyone have any suggestion what I might be missing?

djdomi avatar
za flag
why not install bind9 or dnsmasq to do this job on the ubuntu device?
Alan avatar
in flag
I did consider that, but not sure it will make a difference since nslookup works once I explictly provide the IP of the DNS server. I guess I will give bind a try, see if it helps.
Alan avatar
in flag
Yup, I installed bind on my ubuntu system, and set it to forward all packets to 8.8.8.8. Then set the DNS on the router to use that DNS server, and it works perfectly. Still curious why the existing DNS server didnt work, but sometimes the simple solutions are best!
Tom Yan avatar
in flag
Are you saying that you are using a dedicated router as just a switch (and maybe a DHCP server; WAN disconnected / unused anyway), but this Ubuntu device/PC as the default gateway on other hosts that are connected to this router-as-switch?
Alan avatar
in flag
@TomYan Yes, thats the setup!
Score:0
za flag

As Mentoid by me

Use/install a Local Resolver like Bind9 or dnsmasq

In case you have many requests, it makes more sense to do it on your own.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.