Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Need to know which port to be blocked in my local machine so that the nslookup on A record doesnot work? To know the above i need to understand how the lookup on A record how does the request go from the local machine (port) to the nameservers/ rootservers?

For example: C:> nslookup -type=a google.com

Server: MyDslModem.local.lan Address: 192.168.1.1

Non-authoritative answer: Name: google.com Address: 209.85.231.104

Here which from which local port from the local machine does the lookup starts from?

share|improve this question
1  
Can you explain what you mean? Do you want the A record for your machine to not be resolved by your DNS server? Do you want to block outbound DNS queries so that nslookup doesn't work? Do you want your DNS server to not answer DNS queries? –  joeqwerty Mar 13 '11 at 19:48
    
The question is the second one : " Do you want to block outbound DNS queries so that nslookup doesn't work?" –  msher420 Mar 14 '11 at 18:09
    
My Main intention is to check how all the dns look up on A record would fail in a network. Reason i am needing the info is to setup a domain lookup to verify if the domain in the email address entered is valid. Sorry if my question confounds you!! –  msher420 Mar 14 '11 at 18:18

3 Answers 3

You'll get a better answer if you tell us why you'd want to do this.

DNS traffic uses UDP port 53, but if you want to block that, why not just remove the DNS server configuration from your network adapter?

share|improve this answer
    
My Main intention is to check how all the dns look up on A record would fail in a network. Reason i am needing the info is to setup a domain lookup to verify if the domain in the email address entered is valid. –  msher420 Mar 14 '11 at 18:17

Outgoing network requests are dynamic and network address translation on your router will use the available high ports. When it leaves your network (192.168.1.0/24) your router will use NAT to assign an available dynamic port to service the outgoing request.

That aside, if you want to prevent a host record lookup from succeeding you can either just put a false record and ip address in your local host file or map it to a false address on your local DNS server before it gets forwarded out.

share|improve this answer

You can edit the local hosts file to point specific names to 127.0.0.1 to prevent access.

This works because (in most cases) the lookup will check the local hosts file before the DNS servers - and if a value is returned it won't look any further.

However, verifying this using nslookup on Windows won't work, as nslookup queries the nameserver (hence the name). You can check using ping on the hostname - ping does a normal lookup.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.