Bug #3784
closedCannot enter hostname with a dot
0%
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)
Updated by Daniel Platt over 10 years ago
introduced in commit https://github.com/pfsense/pfsense/commit/46c5b763ef26269b50d303fc62793c58a42eefb1
I can't see any reason for the change
Updated by Daniel Platt over 10 years ago
was looking on github.
The issue it relates to is: https://redmine.pfsense.org/issues/159
Updated by Owen Gerrard over 10 years ago
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
Updated by Buster de over 10 years ago
Why you can't put only "server" into the hostname and "sub.domain.com" into the domain field?
Updated by Owen Gerrard over 10 years ago
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.
Updated by Chris Buechler over 10 years ago
- Description updated (diff)
- Status changed from New to Rejected
The input validation is correct. Hostname must not be a FQDN there.
Updated by Daniel Platt over 10 years ago
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)
Updated by Buster de about 10 years ago
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.