LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-20-2015, 06:48 AM   #1
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Rep: Reputation: 8
dnsmasq advice necessary


I have several services installed on my home server and some other units. I want to access such services both from Internet and from internal home LAN using the same domain name.
At this moment my home network has name <my_router>.ddns.net. All services are redirected to proper node by port mapping (NAT) in router (as always).
So I want install dnsmasq on my home server as DNS server for local network and forwarder to OpenDNS nameservers. It is planned that /etc/hosts file will have entry like this:

Code:
192.168.0.120  <my_router>.ddns.net
Question is. Will be all the traffic addressed to <my_router>.ddns.net be forwarded to address 192.168.0.120 when I am inside my LAN? Be patient that in both cases I use that same host and domain name.
Nest question is. Will be other (not local) addresses located in ddns.net domain available to?
I never used dnsmasq - so my questions.
 
Old 05-21-2015, 09:40 PM   #2
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Check out the man page and config file notes. You can identify exactly what names are local only, and you can set the name(s) of the external dns servers that dnsmasq will forward requests to. In my case, I just set dnsmasq to forward to google public dns, but you can set forwarding to your routers dns if you want.

It won't happen automatically, and your hosts entry you showed above won't have any effect on dnsmasq dns forwarding.
 
Old 05-22-2015, 04:50 AM   #3
mackowiakp
Member
 
Registered: Jun 2014
Location: Poland/Gdynia
Distribution: Mageia 9, SH4, Debian
Posts: 367

Original Poster
Rep: Reputation: 8
THX for Your response. But be so kind to explain me such situation. If I define IP address of my internal node as for example tv.ddns.net and I will query dnsmasq server form my internal LAN, it returns me address like 192.168.0.121, because tv.ddns.net is defined in /etc/hosts file
But if I will query server about lilith.ddns.net, not defined in /etc/hosts, will be such query forwarded to external DNS servers? Be patient that both nodes have the same domain that is ddns.net
 
Old 05-22-2015, 10:57 AM   #4
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
In your /etc/dnsmasq.conf file you can put
Quote:
resolv-file = <resolve file used by dnsmasq>
In CentOS, the /etc/dnsmasq.conf file contains full explanations of all the settings you can use.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I need dnsmasq? rng Linux - General 7 05-17-2013 03:17 AM
dnsmasq harinathreddy.c Linux - Software 2 11-03-2012 12:46 AM
Dnsmasq imas Linux - Newbie 2 04-13-2012 06:12 AM
DNSMASQ anyone? Help! JeffC1 Linux - Software 3 03-31-2009 10:23 AM
Dnsmasq dunkyb Linux - Software 0 03-16-2003 02:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration