i am having problems with wget on linux. After little research i found out that i cant get reply from dns server.
But its really strange because other windows machine (in same network switch) can access the dns.
Wireshark gives me info about that linux machine is sending arp requests for dns into network but cant get reply from it.
On windows machine it seems like that it doesnt send arp request for dns servers, but it just send to dns ip address with mac of default gateway which could be resolved by arp on both machines.
What could be wrong?
linux ip is 10.20.5.1 mask: 255.255.252.0
default gw: 10.20.4.1
dns addresses on: 10.230.6.12 10.230.6.13
Not really a programming question but I'm curious.
You're not on the same network as the dns servers so if you want send traffic to the dns you have to go through the gateway hence I would expect an arp request for the gateway and not for the dns
If your machine is really doing arp for the dns address then that makes me believe that your netmask is not what you say it is (maybe not configured hence /8 -- the std for a class A network)
Can you output:
ip a sh
ip route get 10.230.6.12
Rgds
MArcel
Related
I've got a customer where the router needs to be replaced with a Cisco router.
The current router is a linux machine with webmin installed on it.
There's a BIND DNS server with multiple zones.
There's a zone called companyname.be with entries name-ip (address records).
There's also a zone called 192.9.200 (which is the local subnet) with entries address-name (reverse address records).
This configuration can be seen below:
I'm not sure why they need this but someone at the customer's company told me that it's necessary.
In the end the goal is to be able to ping by using a name rather than an IP.
Does someone know how to configure this in Cisco IOS?
I've been searching this for a while now but all I came up with is this link: http://www.firewall.cx/cisco-technical-knowledgebase/cisco-routers/257-cisco-router-dns-server.html
I tried it but this only seems to create a host table on the router itself.
That hosttable is not used by the DNS.
(Can ping to domain name from router CLI but cannot ping to a domain name from a PC with that router as default gateway.)
I've already found the answer here: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dns/configuration/15-sy/dns-15-sy-book/Configuring-DNS.html#GUID-E4A67061-354E-4847-8F56-9A88446C7D30
R1#conf t
R1(config)#ip domain companyname.be
R1(config)#ip name-server 8.8.8.8
R1(config)#ip dns server
R1(config)#ip host computername1.companyname.be
And for the DHCP server to send the DNS server to DHCP clients:
R1(config)#ip dhcp pool pool_name
R1(dhcp-config)#dns-server ip_address_of_router
Now any host can ping computername1.companyname.be.
I've got a cheap openvz Ubuntu vps and i'm trying to run my own dns server on it for learning purpose.
The dns server works fine in localhost (on the vps through ssh), i can query it using dig google.com #127.0.0.1 and i get the expected result (which is not the IP of google.com but a custom one).
When i try to query the dns server from outside the vps, using the same command, I do get a reply but the IP is not what I expect (it's an actual google.com IP).
After further investigation I found out my dns server is not receiving/sending packets when the query is done from outside the vps. So the answer is sent by something else, it seems like inbound packets with destination port 53 are deviated, they do not even reach my dns server.
I tried to query my dns server, still from outside, but this time while the VPS was SHUTDOWN. Magically i got a reply from god knows who.
Changing port from 53 to 54 everything works perfectly.
The problem is i need it to use port 53.
I don't have iptables rules nor any other firewall doing something related to port 53
I also tried to query some other random vps, from different hosting providers, seems like everyone has a dns server running! Why does everyone reply?
Of course i asked technical support, that's what they said:
Hello,
Sorry but we don't do "software" technical support on VPS.
We deliver the hosting and the operating systems, customers that order VPS are their own admins, and have to know how to manage a linux server.
We don't block any port on our side.
Best regards,
Support
Mybe your dns server is bound to the loopback interface only (so it's only listening on localhost). You can check the current service ports used (udp for DNS) using netstat and filter (grep) udp port used
netstat -an | grep ":53"
Also you can test the same dns query using the nslookup command, and checking the dns server ip that answer your dns query, in the result output:
nslookup google.com [dns_server_ip]
Also test it without dns_server_ip to check if there is a default nameserver when the specified nameserver is not responding.
Problem solved, it's my ISP intercepting and replying to dns queries.
I can do dig google.com #1.2.3.4 and i get a reply :D
Who wants to know more about this:
ISP Intercepting DNS Lookups
One of our application sends messages to the MSMQ that runs on the same server.
Code reference it this way in our Production environment (Note it uses the IP).
net.msmq://123.123.123.123/private/LoggingBiz/Logging.svc
We are building a secondary system and this part of the application did not work.
When we changed it the reference (in URL) to hostname it started working:
net.msmq://hostname/private/LoggingBiz/Logging.svc
When I was talking to the developer said that it might that the MSMQ does not use IP address. But it works in Production, so I am reluctant to accept theory.
I think it is environmental.
Can someone suggest what could have been gone wrong?
Regards,
RM
The hostname will just be looked up to find the IP address using DNS so I think your developer is wrong.
The IP address is then used to lookup a MAC address so if the IP is not working then I suggest there is a problem with the ARP table on the machine.
you could try clearing the IP from the ARP cache:
arp -d <ip address>
Example
arp -d 10.1.1.2
DNS is not working on my embedded device, I can do ping to 74.125.77.147, but ping to google 's ip address 209.85.231.104 works but ping google.com is not working.
embedded device runs embedded linux, It is able to get its ip from dhcp, board is connected to network via Ethernet connection.
What can be the reason?
Look at the file /etc/resolv.conf. The DHCP client should have put the nameserver's IP in there. If not, then your DHCP server may not be passing a DNS address or the client may be ignoring it?
If there's nothing in your /etc/resolv.conf then try adding the line:
nameserver dns-ip-address
Confirm that DNS resolution works by pinging google.com. Then get your DHCP server to send a DNS IP as part of it's configuration to the client.
Our user interface is communicating with another application on a different machine, often connecting using domain names.
On our network, when IPv6 is installed, DNS name resolution works great, all machines can be pinged and contacted fine.
When IPv6 is uninstalled, pinging the same DNS names returns an IP address on some distant subnet (24.28.193.9; local subnet is 192.168.1.1); our application is then unable to communicate. When IPv6 is reinstalled, the DNS resolution corrects itself.
Even without IPv6 when ping is not working, I can still browse other machines using Windows Explorer by entering \\\\MACHINE_NAME\\. I'm not sure why the name resolution seems to work here. We are working in the Windows XP SP2 environment.
The IPs of the machines can be pinged successfully. It is only the DNS names that do not resolve properly.
I looked for the address of our DNS server. All of our computers are pointing at the network gateway, which is a wireless router. The router has the same DNS server address listed when IPv6 is installed as it does when it isn't installed.
The strangest thing is that I just discovered that it does not matter what DNS name I ping. All pings to DNS names return the same address: "24.28.193.9".
I tried flushing the DNS Resolver Cache and registering DNS on the target machine and the source machine. All to no avail. The only DNS name that I can ping is the name of the current machine.
Any thoughts as to why our software can't communicate without IPv6 installed?
UPDATE:
OK, I've done a little more research now.
I looked for the address of our DNS server. All of our computers are pointing at the network gateway, which is a wireless router. The router has the same DNS server address listed when IPv6 is installed as it does when it isn't installed.
The strangest thing is that I just discovered that it does not matter what DNS name I ping. All pings to DNS names return the same address: "24.28.193.9".
I tried flushing the DNS Resolver Cache and registering DNS on the target machine and the source machine. All to no avail. The only DNS name that I can ping is the name of the current machine.
Any other suggestions? Thanks so much for your help.
You've got multiple things going on here
DNS Name resolution
Windows Name resolution
IP-IP ICMP communication
You've written your question as if there's a problem with #3, but everything you describe points to the problem actually being with #1. If you take resolution out of the question, can you ping the correct IPs with our without IPv6 installed?
It sounds like maybe you have an IPv6 name server installed that has correct information and the IPv4 name server is incorrect? Are you receiving name servers via DHCP or hard coding? What are the IPs of the name servers you are using when IPv6 is installed and when it isn't?
I know this is a late answer, but in case someone else has the same problem, the key is the IP address, "24.28.193.9". A quick Google search reveals it seems to be related to your ISP completely breaking the DNS protocol by returning a fixed IP address for all non-existent domain names (the correct answer would be NXDOMAIN). Your network gateway is most probably just forwarding your queries to your ISP's name servers.
Your systems are relying on the correct operation of the DNS protocol. They are expecting a NXDOMAIN answer before querying the name via other methods (most probably NetBIOS name resolution). Since the DNS server is completely broken and returning an incorrect answer, the correct address is never looked up.
The reason installing or uninstalling IPv6 changes the situation is most probably because something related to it is changing the name resolution order (to look up using other methods before trying DNS). So, a workaround would be to change the name resolution order yourself.
The real fix would be to either change to a better ISP (one which does not break established protocols) or run your own DNS server (which is what I started doing on all systems I administer ever since VeriSign pulled a similar stunt; theirs was even worse in that changing ISPs made no difference at all).
References:
Warning: Road Runner DNS says nonexistent domains exist