Bug #3784
closed
Cannot enter hostname with a dot
Added by Daniel Platt over 10 years ago.
Updated about 10 years ago.
Description
We want the hostname name of our server to be server.sub.domain.com, but pfsense doesn't recognise server.sub as a valid hostname
pfsense / usr / local / www / services_dhcp_edit.php
if (strpos($_POST['hostname'],'.')) {
$input_errors[] = gettext("A valid hostname is specified, but the domain name part should be omitted");
}
version 2.1.4-RELEASE (amd64)
I guess to enforce the message on the page to only use the host and not the domain part, checking for a dot was seen as reasonable. However, I agree that being able to have host names with dots is useful so perhaps checking that the string doesn't end with the pfSense host name explicitly rather than checking just for a dot would be a solution to both problems?
Daniel Platt wrote:
introduced in commit https://github.com/pfsense/pfsense/commit/46c5b763ef26269b50d303fc62793c58a42eefb1
I can't see any reason for the change
Why you can't put only "server" into the hostname and "sub.domain.com" into the domain field?
Buster de wrote:
Why you can't put only "server" into the hostname and "sub.domain.com" into the domain field?
Because we have more than one subdomain on the network.
- Description updated (diff)
- Status changed from New to Rejected
The input validation is correct. Hostname must not be a FQDN there.
How is "server.sub" considered a FQDN?
It's funny how we can do exactly the same thing if we use dynamic ip, yet it's impossible with static IPs.
Daniel Platt wrote:
We want the hostname name of our server to be server.sub.domain.com, but pfsense doesn't recognise server.sub as a valid hostname
pfsense / usr / local / www / services_dhcp_edit.php
[...]
version 2.1.4-RELEASE (amd64)
Owen Gerrard wrote:
Buster de wrote:
Why you can't put only "server" into the hostname and "sub.domain.com" into the domain field?
Because we have more than one subdomain on the network.
I don't see your problem here.
example: server.sub2.sub1.domain.tld
server is hostname and sub2.sub1.domain.tld is the (4th level) domain.
Also available in: Atom
PDF