How can I bypass dns for one hostname on one wifi network

0

I'm a complete beginner when it comes to network administration, and am trying to speed up a connection when possible.

I have a service on my laptop configured to connect to my server over the internet, which works but is slow. I'd like to bypass the internet and connect locally when I'm on the same network. The problem is that the URI that I connect to is not on a domain I control (BTMM) so all my attempts to setup dns to point to the right box have ignored my dns server and been passed along to the dns server that I use for forwarding.

I also have dnsmasq installed on my laptop to keep all *.dev requests local, so if a solution could use that, it's an option.

Camden Narzt

Posted 2015-07-22T03:42:32.410

Reputation: 639

Answers

0

Add a line in your hosts file with the server IP to connect and the name you want to use to connect to it:

192.168.0.100 the.name.of.your.server alias.to.your.server

Where 192.168.0.100 is the IP of the server (can be local or public)

laurent

Posted 2015-07-22T03:42:32.410

Reputation: 4 166

But then when I'm not on the same network as the server I won't be able to access it. I'm looking for this to only be in effect when I'm on the same network. – Camden Narzt – 2015-07-22T14:48:48.000

True. This is not an automatic way but may be of use depending on your case. You can define the name you want in the.name.of.your server and use this name to access your server only when you are on the same network. – laurent – 2015-07-22T21:26:13.510