Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to use netmasq and samba4 at the same time?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Tue Apr 26, 2016 2:29 pm    Post subject: how to use netmasq and samba4 at the same time? Reply with quote

Hi,

In my scenario, I need to install both netmasq and samba4 at the same time and on the same machine.

I investigate this issue for a while but I fail at last.

Does samba4 support listening dns request from a customized port rather than 53? How to make it?

Do I need to configure a dedicated loopback interface, such as lo2 to receive the query from the opposite dns software? Or I don't need to do so since "lo" interface can receive both 127.0.0.1 and 127.0.0.2 IP address? If the answer is needing, how to accomplish this in Gentoo?
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 619
Location: France

PostPosted: Wed Apr 27, 2016 9:20 am    Post subject: Re: how to use netmasq and samba4 at the same time? Reply with quote

bluephoenix wrote:
In my scenario, I need to install both netmasq and samba4 at the same time and on the same machine.

You mean dnsmasq, I presume ?

Quote:
Does samba4 support listening dns request from a customized port rather than 53? How to make it?

If you want to install an AD server, forget that. Even if you make it working, the clients won't use another port than 53. You should consider replacing dnsmasq with Bind.
If not, why bother ? In this case, Samba doesn't need to be a DNS server.

Quote:
Do I need to configure a dedicated loopback interface, such as lo2 to receive the query from the opposite dns software? Or I don't need to do so since "lo" interface can receive both 127.0.0.1 and 127.0.0.2 IP address? If the answer is needing, how to accomplish this in Gentoo?

As you're talking about local addresses only, I suppose you really don't need AD capabilities. Or I didn't understand what you want to do.
Back to top
View user's profile Send private message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Wed Apr 27, 2016 12:36 pm    Post subject: Reply with quote

Thanks Syl20!

Your explanation is quite clear!

My problem is really relative with dnsmasq, but not netmasq. Somehow I cannot use bind because I don't know how to let bind manage those domain names out of local zone(domain). My operator's public DNS is polluted since the political or some other reasons. And this impacts dozens of different website's domain name, including google. I cannot suffer this as a technical guy. The only lucky thing is I can get some clear resolved domainname-IP pair from somewhere in the Internet with a "hosts" file format. At the beginning I just download this hosts file and replace my local one. But later, I have more (4) computers now. Updating those hosts file every time is boring. Thus, I decided to use a local DNS to centralize the domain name updating. In my condition, I choose dnsmasq naturally for the "hosts" file format reason. This works good. But these days I want to setup AD by samba. If I have more than 1 server, there would be no problem. But it is a pity that I have only one server without VM support.

So is there some new advice from you? I find from Internet someone has accomplished this by using a firewall on the same machine. Because the firewall can support port translation for UDP and TCP packages. Thus the 53/5353 problem could be solved. But I also don't want to install a firewall just for this purpose. This solution is too dirty to me.
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 619
Location: France

PostPosted: Mon May 02, 2016 9:39 am    Post subject: Reply with quote

bluephoenix wrote:
Somehow I cannot use bind because I don't know how to let bind manage those domain names out of local zone(domain).

So you'll have to learn that. :wink:

I suppose you need to serve DNS requests from your local network only. The typical setup is one (in fact, two : one "forward" zone, and one "reverse" one) "local" zone (type master), and a "forwarders" option for all the rest. You can restrict bind to serve only your intranet by setting the "listen-on" and "allow-query" options.
There are plenty of how-tos on the web.

Once done, you just have to include the Samba interface.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum