Author Topic: DNS not working for ssh (but works fine for other services)  (Read 1707 times)

miquel

  • Zen Apprentice
  • *
  • Posts: 38
  • Karma: +1/-0
    • View Profile
DNS not working for ssh (but works fine for other services)
« on: February 02, 2013, 10:26:55 am »
My Zentyal 3.0 server has two network interfaces: eth0 (internal) and eth1 (external) and there are 8 hosts defined in DNS: 2 virtual machines (xp / openSUSE) and 6 phisical (all them ubuntu 12.04).

I can ping every remote_hostname and access without issues to http://remote_hostname, so it seems DNS is correctly setup, isn't it?

The problem is ssh/rsync: 'ssh remote_user@remote_hostname' allways fails, because ssh tries to do 'ssh remote_user@localhost' instead ('rsync rsync://remote_host' also fails as it's seen as 'rsync rsync://localhost')

Of course ssh in 'remote_host' is correctly configured and 'ssh remote_user@192.168.12.X' works as espected.

Identical setup in Zentyal 2.2 is working flawlesly, so I guess i'ts a DNS issue.

Any one can help me?

Thanks.

Sam Graf

  • Guest
Re: DNS not working for ssh (but works fine for other services)
« Reply #1 on: February 02, 2013, 03:05:38 pm »
I cannot help you, but if I understand your DNS configuration correctly, you have client machines explicitly configured in local DNS. In that case, I'm not sure you're using DHCP either. But just for the sake of experimentation, it might be interesting to know if the behavior is different using DHCP's dynamic DNS option.

miquel

  • Zen Apprentice
  • *
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: DNS not working for ssh (but works fine for other services)
« Reply #2 on: February 02, 2013, 05:42:30 pm »
No, you're wrong here: no local DNS at all, only DHCP

This is not a client side issue: remember all clients (phisical and virtual) in my network are working fine -with any kind of change- against a Zentyal 2.2 server (running in a different box, but identical hardware), so, bug or mistake, this is a Zentyal 3.0 issue.

Of course, having less than 10 hosts in the network, this is not dramatic as the problem can be workarounded via /etc/ssh/ssh_config, but this is not what I'm looking for (and will be not suitable for most bigger networks).

Regards.

Sam Graf

  • Guest
Re: DNS not working for ssh (but works fine for other services)
« Reply #3 on: February 02, 2013, 06:23:28 pm »
Of course, the change to Samba 4 has made direct comparisons between Zentyal 2.2 DNS configuration and Zentyal 3.0 DNS configuration less than straightforward. That doesn't rule out a Zentyal 3.0 issue, but the configurations are not necessarily identical, and you did actually ask about your DNS configuration.

By local DNS I mean LAN DNS rather than WAN DNS.

miquel

  • Zen Apprentice
  • *
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: DNS not working for ssh (but works fine for other services)
« Reply #4 on: February 02, 2013, 09:36:14 pm »
I've found the problem: ssh tries first to connect via ipv6 and there is a bug in AAAA register setup in Zentyal DNS wich points to ::1 (=localhost) instead real server ip.

For now, 'ssh -4 user@remote.host' is the simplest workaround.

For now, adding "AddressFamily inet" to /etc/ssh/ssh_config in every host in the network is the most effective workaround, since works for ssh as well for rsync and is not necessary modify any script, but may be annoying in large networks.

Of course, the real solution is to configure/drop AAAA register via Zentyal, but I dont see the way to do it.

So, the question is: How can I setup AAAA register in Zentyal?

Regards
« Last Edit: February 02, 2013, 11:09:56 pm by miquel »