LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-03-2022, 05:28 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,773
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
seeking In-home "private IP" LAN config for DNS



I use a private IP inside my at-home LAN.
How do I:
  • Is there other than BIND for an at-home LAN?
  • config an internal DNS
  • config so my DNS will cache entries
    that I use from the public internet
  • enable all my at-home devices and
    systems to "gateway" including my private DNS.

Thanks in advance,
~~~ 0;¬Dan
 
Old 11-03-2022, 06:02 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
dnsmasq is capable of being all that.

https://wiki.archlinux.org/title/dnsmasq
 
1 members found this post helpful.
Old 11-04-2022, 03:48 AM   #3
killerhippy
LQ Newbie
 
Registered: Jan 2021
Location: Germany
Distribution: debian
Posts: 22

Rep: Reputation: Disabled
Consider using a pi-hole.
 
1 members found this post helpful.
Old 11-04-2022, 03:59 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by killerhippy View Post
Consider using a pi-hole.
I second this. It makes it trivial to have DNS on the home network for internal hosts and you get all the nice DNS based ad blocking.

Evo2.
 
1 members found this post helpful.
Old 11-16-2022, 01:22 PM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,773

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Thank you for the pi hole suggestion. I'll look into that.

QUESTION: Can someone direct me to a HOWTO for in-home DNS?
The last time I had this working, I used a small army of /etc/host file updates and fixed IP addresses for the in-house devices. Now that most devices go walk-about, DHCP rules the day.
I"d love to have fixed IP at home and DHCP in the wild. I haven't discovered how to do that... yet.

QUESTION: Will I need to change LAN Gateway settings for this to work properly?
Currently, my gateway router is the LAN "gateway" IP address. I do not have any sort of DMZ.
 
Old 11-16-2022, 03:44 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
I have not played with Pi-hole but it uses a forked version of dnsmasq and can be configured as a DHCP server.
You can configure your devices to use a fixed IP address from the DHCP server by setting up an address reservation. This is typically accomplished using the MAC address and assigning an IP address that is outside the DHCP address range. Pretty much all SOHO routers now days support address reservations.

If you use the Pi-hole or other dnsmasq server you will need to turn off the DHCP server on the router and set a gateway address on the dnsmasq server that points to the router's address.

Here are a couple of guides.
https://wiki.archlinux.org/title/dnsmasq
https://www.tecmint.com/setup-a-dns-...n-centos-rhel/
 
Old 11-17-2022, 12:11 PM   #7
killerhippy
LQ Newbie
 
Registered: Jan 2021
Location: Germany
Distribution: debian
Posts: 22

Rep: Reputation: Disabled
michaelk is right of course, but I use a much easier possibility. I have configured /etc/hosts at the pi-hole to point to my local lan clients.
 
Old 11-17-2022, 12:34 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
That works because dnsmasq will add the the static clients in the /etc/hosts to its local dns records. You need to configure your clients with static ip addresses or just rely on the dhcp server to always assigning the same address to the same client. On a small lan and a big dhcp address pool that should work but not 100% guaranteed. Then all you need to do is change the router's settings for your clients to use the Pi-hole as DNS server.

Last edited by michaelk; 11-17-2022 at 01:03 PM.
 
Old 11-26-2022, 12:04 PM   #9
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,773

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by michaelk View Post
That works because dnsmasq will add the the static clients in the /etc/hosts to its local dns records. You need to configure your clients with static ip addresses or just rely on the dhcp server to always assigning the same address to the same client. On a small lan and a big dhcp address pool that should work but not 100% guaranteed. Then all you need to do is change the router's settings for your clients to use the Pi-hole as DNS server.
When you say, " configure your clients with static IP addresses " are you talking about the gateway-router feature that maps a client MAC address to a LAN IP address? My router insists that the target IP addresses lie inside the configured DHCP space.

Readings elsewhere online suggest that I configure clients outside of the DCHP space. Doesn't that mean I configure each client at the client? I don't know any way to do that for phones and tablets. Only some of my IOT devices have a way to set the IP address if not DHCP.

Thanks for the reply, but I'm confused,
~~~ 0;¬/ Dan
 
Old 11-26-2022, 10:35 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Quote:
are you talking about the gateway-router feature that maps a client MAC address to a LAN IP address?
Yes, setting address reservations for dnsmasq DHCP server and isc-dhcp-server as far as I know are outside of the DHCP pool whereas SoHo router's address reservations tend to be within the pool. You should not have to set a static IP address on the device itself. Iphones and Androids mobile devices tend to have the automatic MAC changers on by default now days which makes which makes using address reservations or /etc/hosts as posted difficult on purpose.
 
Old 12-03-2022, 08:44 AM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
On Lan systems one used to use Hosts files. I still do.
 
  


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
Trying to understand DNS resolve process in a home lan behind a home gateway. chomwitt Linux - Networking 5 01-03-2021 03:05 AM
seeking help with home LAN/net troubles SaintDanBert Linux - Networking 10 01-27-2020 02:23 PM
seeking "home office" or "small business" server advice SaintDanBert Linux - Server 10 05-04-2014 05:12 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
Accessing a private LAN from another private LAN sholah Linux - Networking 3 07-10-2007 08:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:21 PM.

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