Author Topic: [SOLVED.....kind of] DNS - External IP picked up in Internal DNS  (Read 4607 times)

shahsx

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: DNS - External IP picked up in Internal DNS
« Reply #15 on: November 05, 2013, 11:26:12 am »
The external IP is added through Network -> Interfaces.  When i go to the Host Record in DNS it just shows the Internal IP of the server and not the external IP but when I do nslookup i can see both IP's coming up.

Like I said if i restart DNS the external IP does not show up for a while on nslookup but after about five minutes it's there again so it is being added dynamically.

I guess I will open a ticket and see what happens.

christian

  • Guest
Re: DNS - External IP picked up in Internal DNS
« Reply #16 on: November 05, 2013, 11:43:06 am »
If IP is not added to DNS record, then it is not "dynamically" added.

I suspect there is something else wrong on your side.

shahsx

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: DNS - External IP picked up in Internal DNS
« Reply #17 on: November 05, 2013, 12:04:51 pm »
ok more specifically the IP is dynamically added to DNS but it does not show up on the web interface.

christian

  • Guest
Re: DNS - External IP picked up in Internal DNS
« Reply #18 on: November 05, 2013, 12:16:16 pm »
ok more specifically the IP is dynamically added to DNS but it does not show up on the web interface.

do you have any dig output ?

christian

  • Guest
Re: DNS - External IP picked up in Internal DNS
« Reply #19 on: November 05, 2013, 03:06:06 pm »
Replying here so that we can share progress (or problem) with other users:

We have performed some test with shahsx.
Here is the issue he faces. Perhaps some 3.2 users can comment and help.

Server is running file sharing service.
- trying to resolve Zentyal server name returns 2 IPs: one for the internal interface, one for the external interface
- if you remove Zentyal host in DNS using Zentyal GUI, then another entry is automatically (and quickly) added, visible in GUI but without any IP.
- if you add an IP, everything looks OK but after few minutes (about 8 minutes) although thre is no change at GUI level, another record is added to DNS, visible using

Code: [Select]
dig axfr [yourdomain]
and if you resolve this server name, you get 2 IPs again, one for the internal, one for the external.

My question here:
- aside the strange nslookup behaviour, may this prevent Windows users to authenticate against Zentyal DC ?

We could have pushed further tests, e.g. disabling file sharing service but I'm already pretty convinced that such wrong behaviour is due to Samba handling one part of DNS content management on the behalf of Zentyal administrator.

Someone to confirm or to explain what's wrong ?


shahsx

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: DNS - External IP picked up in Internal DNS
« Reply #20 on: November 11, 2013, 06:49:12 am »
Hello,

Ok after a lot of effort from Christian (much appreciated) and Zentyal support we have finally got to the bottom of this. It turns out that this is not an issue at all but a new "design feature" of Zentyal 3.2.

There new strategy is that all services will listen on all interfaces   ???  A reference to the code here:
https://github.com/Zentyal/zentyal/commit/9b5096ff647841d658c8e47a986b0ee67ce9249e

It has something to do with clients that only use one interface and allowing them to do more with the system....I am not really to sure.

Workaround:
There is a workaround to this where you can initialise the "sortlist" function in DNS through a hook so only internal addresses are returned. It goes a little something like this:

sudo mkdir /etc/zentyal/stubs/dns
sudo cp /usr/share/zentyal/stubs/dns/named.conf.options.mas
/etc/zentyal/stubs/dns

Conf key to enabled at /etc/zentyal/dns.conf


another workaround would be to use hooks to configure Samba to look at just the internal interfaces.

Thanks,

christian

  • Guest
Re: [SOLVED.....kind of] DNS - External IP picked up in Internal DNS
« Reply #21 on: November 11, 2013, 08:42:16 am »
It looks like, in the meantime, Zentyal decided to enable this feature as a default one. Perhaps because we struggled to fix it  :P
Anyway, I don't know if it has been pushed yet but it should soon and should also solve similar issue for other users.

kerridge0

  • Zen Monk
  • **
  • Posts: 57
  • Karma: +1/-0
    • View Profile
Re: [SOLVED.....kind of] DNS - External IP picked up in Internal DNS
« Reply #22 on: November 19, 2013, 03:23:08 pm »
I don't understand why you would need to use the stub file  - if you can just change the dns.conf?

at least enabling sortlist is now mentioned in the documentation?

http://doc.zentyal.org/en/filesharing.html

(came here as my vpn connection broke dns...)

christian

  • Guest
Re: [SOLVED.....kind of] DNS - External IP picked up in Internal DNS
« Reply #23 on: November 19, 2013, 03:26:26 pm »
I don't understand why you would need to use the stub file  - if you can just change the dns.conf?
because if you change dns.conf without using hook, your chage will be erased soon  ;)

Quote
at least enabling sortlist is now mentioned in the documentation?

Sure but at the time we were discussing this, sortlist was not yet enabled by default  8)

nontrivial

  • Zen Warrior
  • ***
  • Posts: 181
  • Karma: +16/-0
    • View Profile
Re: [SOLVED.....kind of] DNS - External IP picked up in Internal DNS
« Reply #24 on: December 27, 2013, 04:24:20 pm »
Hello, this issue is causing me problems as well. Can somebody please give me a little more detail about what changes to make in the DNS related config files to work around the issue until a more permanent solution is in place?

James

nontrivial

  • Zen Warrior
  • ***
  • Posts: 181
  • Karma: +16/-0
    • View Profile
Re: [SOLVED.....kind of] DNS - External IP picked up in Internal DNS
« Reply #25 on: December 27, 2013, 08:07:58 pm »
I just realized that my issue is slightly different, so I am going to start a new topic.

James

LaM

  • Zen Apprentice
  • *
  • Posts: 41
  • Karma: +0/-0
    • View Profile
Re: [SOLVED.....kind of] DNS - External IP picked up in Internal DNS
« Reply #26 on: February 02, 2016, 05:30:47 pm »
Hi everyone,

even with sortlist = yes i have the same issue!
With nslookup I have either the internal and the external interface IP!

...H.E.L.P. PLEASE... =)

It's driving me nuts since my client PCs asking for samba's share, are quite often receiving the external IP (not the internal one) and so aren't able to open the share correctly.

Thank You in advance for any kind of help/hint/hand/else =D

Luca

ap1821

  • Zen Monk
  • **
  • Posts: 72
  • Karma: +4/-0
    • View Profile
Re: [SOLVED.....kind of] DNS - External IP picked up in Internal DNS
« Reply #27 on: January 20, 2017, 06:19:04 pm »
I'm waking this old topic up.
I stumbled upon this problem too. The external IP address was picked up after a while when DNS server starts. The problem is actually a bug in Zentyal 4.2, but is easy to fix as all stubs are editable.

Samba thinks that it is enabled on the external interface, so you need to edit /usr/share/zentyal/stubs/samba/smb.conf.mas and set the interfaces manually there

    interfaces = lo,eth0,eth1,eth1:virtual0
    bind interfaces only = yes

I had to remove my external interface (eth0) and samba doesnt add the external IP to DNS anymore.
Restart zentyal samba after that and you are done. Only it might overwrite the stub after zentyal-samba updates. Other than that a nice fix that I found out.
I have latest 4.2 version of Zentyal.
Running Zentyal 3.0 on another machine and it sets the correct interfaces.