Jump to content

Is their a way to get the Shark Jack to use the DNS servers that get assigned by the DHCP server?

Recommended Posts

Is their a way to get the Shark Jack to use the DNS servers that get assigned by the DHCP server?

When I am using it on one of my local networks, I would like it to connect to my C2 server using it's internal address instead of the external address.  My internal DNS server is setup to resolve the DNS name of the C2 server to it's internal address, but the Shark Jack does not appear to be using my internal DNS server that was assigned by the DHCP server.

For example, if I am on my internal network the internal DNS servers resolve c2.externaldomain.com to

When I boot the Shark Jack into arming mode and switch to DHCP_CLIENT mode, it successfully gets an IP address from my DHCP server. Then if I issue a "nslookup c2.externaldomain.com" to seems to use itself as the DNS server and returns the external IP address instead of the internal IP address that my internal DNS servers resolves. 

If I manually specify the DNS server in the nslookup command like "nslookup c2.externaldomain.com" it resolves correctly. So I know my DNS server is resolving correctly. I also know that my DHCP server is setting the correct DNS server because other devices using DHCP on the network can resolve correctly.

It appears that instead of using the DNS server that was provided by DHCP, it is using itself do the lookups and forwarding the request to some other external DNS server..

I can override this by adding an entry for my C2 server in the hosts file, but their has to be a better way. I don't like doing it this way because if I forget to remove the entry from the hosts file before shipping it out I will have issues.

Any suggestions?

Link to post
Share on other sites
4 hours ago, ngoetz said:

Any suggestions?

You might be able to do something. I haven't tried and messing here might give you problems.

But that being said if you look in /etc/config/network you should see some interfaces. Maybe the one you need is there, maybe not. If it is then you can carefully edit the right one and change the primary DNS to your local and leave the secondary with google for example. If i get time later tonight I can have a look. If you get a chance to look at it let me know how you get on.

EDIT - So i got to have a quick look and its not in the network file. I'm not 100% sure where it is, but i did notice an option in the DHCP file that allows/disallows contacting DNS on different subnets. It must be there somewhere, i had a little peak around in /rom/ just in case but im always nervous to touch too much. Otherwise im guessing its something to do with DNSMasq. If i get more time i might look further.

Edited by Just_a_User
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...