I have a openwrt router, and a client linux connected to it. I config the dnsmasq with
resolv-file=/tmp/resolv.conf.auto
For example, when I use nslookup on the client, nslookup google.com is OK, but nslookup bd.ysmood.org says No answer.
How to make the router work properly?
OK, since the bd.ysmood.org is an internal IP address. The dnsmasq's rebind_protection will make the lookup fail.
Edit the /etc/config/dhcp, find the line:
option rebind_protection 1
Change the 1 to 0 will do it.
Related
I was wondering how I would make an alias for localhost that has a tld.
For example, foo.test wold connect to 127.0.0.1.
I tried just adding a second line to /etc/hosts that also pointed to 127.0.0.1, but that didn't seem to work. Although, I didn't reboot, so that might be why.
The end goal is to have it so that I can test that a request is being sent to a specific subdomain in the Rocket framework for Rust. IE: foo.bar.test instead of baz.bar.test or just bar.test.
The man page for /etc/hosts says:
IP CANONICAL ALIAS ...
127.0.0.1 foo.test localhost
Should be good
But is the host really handling traffic from this IP address ?
Alternatively, the interface specific line can include the aliases
10.0.0.1 foo.bar.test foo
10.0.0.2 baz.bar.test baz
I am trying to run a coredns plugin https://github.com/coredns/demo that returns 1.1.1.1 for 172.0.0.0/8 or 127.0.0.0/8 and 8.8.8.8 for everything else.
I run the binary and try to make a request from dig using dig example.org #localhost -p1053 +short which returns 1.1.1.1 since the request is sent from localhost
Is there anyway I can send a request from dig to coredns that it might look like to the DNS server that it is sent from another IP and it will return 8.8.8.8 instead?
From dig manual:
-b address[#port]
Set the source IP address of the query. The address must be a valid address on one of the host's network interfaces, or "0.0.0.0" or "::". An optional port may be
specified by appending "#<port>"
Otherwise, if the server supports ECS (EDNS Client Subnet) you can use dig option +subnet=addr to give it to the server and see how its reply changes.
I tried to connect to my wifi network but i am not able to connect through my laptop .My other device at home are able to connect to internet. I am using ubuntu 16.04 LTS . I set my browser proxy to no proxy . I have no antivirus installed .
I tried to ping -c 5 (google .com and facebook.com) in terminal its showing unknown host google.com and unknown host facebook.com and tried to install eclipse while downloading it shows error java error unknown host .
Please help me to solve this issue.
Sounds like DNS may not have been configured when you connected to the network. This should normally happen automatically, but you can check by looking at the file /etc/resolv.conf. There should be at least one line in the file containing nameserver and an IP address.
If there are no nameserver lines, or if there's only one and it says nameserver 127.0.0.1, then you can try to use Google's public DNS by adding the line nameserver 8.8.8.8 (replacing the 127.0.0.1 if that's present).
Like everyone, I had to face this issue. So what did I do to address this issue?
1) I configured my Ubuntu server to have two network interfaces (NAT and Intnet).
2) In /etc/network/interfaces , I added the following lines:
auto enp0s8
iface enp0s8 inet static
address 192.168.10.23
dns-nameservers 8.8.8.8 8.8.4.4
3) Restarted the network - /etc/init.d/networking restart
Result: ping google.com worked.
I hope this helps you in resolving this issue :)
How do I exclude DNS from the DHCP lease request on a Raspberry Pi?
I tried updating /etc/resolv.conf but it's reset after a while.
Reason: I am on a home network, and the home router uses itself as the DNS server, but the router's DNS service isn't working properly sometimes.
Most of the answers didn't work for me, but I found that this worked:
sudo vi /etc/dhcpcd.conf
Added a line (note that there is no comma):
static domain_name_servers=8.8.8.8 8.8.4.4
And unplugged and replugged my ethernet cable, which updates the resolver...
cat /etc/resolv.conf
Now shows:
# Generated by resolvconf
domain example.com
nameserver 8.8.8.8
nameserver 8.8.4.4
This also a better way to fix the problem where changes to /etc/resolv.conf are lost on reboot.
I asume the problem is, that the dhcpclient is getting new information about DNS servers with every dhcp-renewal. Add this line into /etc/dhcp/dhclient.conf:
option domain-name-servers 192.168.1.8, 8.8.8.8, 8.8.4.4
Of course you should replace the ip-addresses with the ones from your demanded DNS server. Probably restart the according service.
In order to get internet through USB from my ubuntu host, I changed routing on beaglebone
route add default gw 192.168.7.1
and change /etc/resolv.conf into
nameserver 192.168.1.1
It gets internet but I cannot ssh beaglebone like before anymore from any host.
Normally I did ssh root#192.168.7.2
but it doesn't return any message or prompt to enter password.Just blank waits there.
I there any way to fix it?
Are you sure that you shouldn't configure /etc/resolv.conf with
nameserver 192.168.7.1
It my happen that the ssh daemon is trying to resolve the reverse of the ip address you're connecting from, and it takes long to timeout, giving you the impression that it does not work.