Setting a FQDN for QNAP?
-
- Getting the hang of things
- Posts: 62
- Joined: Sun Aug 01, 2010 8:33 am
Setting a FQDN for QNAP?
Is there anywhere in the system I can set a domain name for my unit? Currently it's the only host on my network that doesn't have a FQDN, which is mucking up certain scripts and slowing down DNS queries. I don't see an option for it anywhere in the GUI so I wondered if anyone knew of which file(s) govern the domain name setting of the NAS...?
The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair.
-
- New here
- Posts: 8
- Joined: Fri Nov 06, 2015 6:23 am
Re: Setting a FQDN for QNAP?
To get the FQDN right, you need /etc/hosts to be right. QTS 4.2 over-writes it at startup based on the hostname, IP address, and the realm setting in /etc/config/smb.conf. So, SSH in and:
That'll be stable across reboots, and works without you having to first configure Network Services > Win/Mac/NFS > Microsoft Networking.
Code: Select all
/sbin/setcfg global realm YOUR.DOMAIN.HERE -f /etc/config/smb.conf
/etc/init.d/network.sh restart
hostname -f
- pwilson
- Guru
- Posts: 22533
- Joined: Fri Mar 06, 2009 11:20 am
- Location: Victoria, BC, Canada (UTC-08:00)
Re: Setting a FQDN for QNAP?
Fix your DNS Server on your network. (This isn't a NAS issue at all).stdPikachu wrote:Is there anywhere in the system I can set a domain name for my unit? Currently it's the only host on my network that doesn't have a FQDN, which is mucking up certain scripts and slowing down DNS queries. I don't see an option for it anywhere in the GUI so I wondered if anyone knew of which file(s) govern the domain name setting of the NAS...?
My NAS (known as "nasty" on my network). Here is output from my PC:
Code: Select all
pwilson@pwilsont500:/$ nslookup nasty2
Server: 10.77.13.1
Address: 10.77.13.1#53
Name: nasty2.XXXXXXXX.myqnapcloud.com
Address: 10.77.13.145
Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs
Please review: When you're asking a question, please include the following.
- schumaku
- Guru
- Posts: 43579
- Joined: Mon Jan 21, 2008 4:41 pm
- Location: Kloten (Zurich), Switzerland -- Skype: schumaku
- Contact:
Re: Setting a FQDN for QNAP?
No idea for what purpose you need this...disputable if a FQHN belongs into the hosts file.garthk wrote:That'll be stable across reboots, and works without you having to first configure Network Services > Win/Mac/NFS > Microsoft Networking.
When you join the NAS as a standalone server to an Active Directory, the realm is set.
And then: This is a Kerberos realm, not an FQDN - even if AD might use the same.
- pwilson
- Guru
- Posts: 22533
- Joined: Fri Mar 06, 2009 11:20 am
- Location: Victoria, BC, Canada (UTC-08:00)
Re: Setting a FQDN for QNAP?
My NAS has multiple FQDN's, and none of them are defined anywhere on the NAS, except in my Virtual Host configuration for my NAS-based Apache Web Server.schumaku wrote:No idea for what purpose you need this...disputable if a FQHN belongs into the hosts file.garthk wrote:That'll be stable across reboots, and works without you having to first configure Network Services > Win/Mac/NFS > Microsoft Networking.
When you join the NAS as a standalone server to an Active Directory, the realm is set.
And then: This is a Kerberos realm, not an FQDN - even if AD might use the same.
I sure as heck didn't need to hack anything with "setcfg" to get it working.
If he needs to setup his AD (Kerberos) Domain, it can be done without "setcfg":
Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs
Please review: When you're asking a question, please include the following.
- schumaku
- Guru
- Posts: 43579
- Joined: Mon Jan 21, 2008 4:41 pm
- Location: Kloten (Zurich), Switzerland -- Skype: schumaku
- Contact:
Re: Setting a FQDN for QNAP?
With the realm defined in smb.conf, QNAP does automatically propagate the fully qualified host name into the (automatically maintained ) hosts file. That's all - and this is caused by the assumption that the Kerberos realm and the Domain is the same - what is of course not always correct: DNS can be structured, ie, based on data centers and the servers might be nas1.dc1.domain.com, nas2.dc1.domain.com, nas1.dc2.domain.com, and nas.dc2.domain.com ... the (single) primary forest Kerberos realm is still domain.com ... so here the QNAP "logic for simple minds" goes wrong.
The only advantage we're gaining is that the name resolution so looking for hosts, then for DNS - so some tools like netstat shows the (much longer) fully qualified name, and the fully qualified hostname can be resolved even of DNS is down.
The more ubiquitous Apache configured hostname is still wrong ... but rarely used nowadays.
The only advantage we're gaining is that the name resolution so looking for hosts, then for DNS - so some tools like netstat shows the (much longer) fully qualified name, and the fully qualified hostname can be resolved even of DNS is down.
The more ubiquitous Apache configured hostname is still wrong ... but rarely used nowadays.