Project

General

Profile

Actions

Bug #3784

closed

Cannot enter hostname with a dot

Added by Daniel Platt over 10 years ago. Updated about 10 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/30/2014
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:

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)

Actions #1

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

Actions #2

Updated by Daniel Platt over 10 years ago

was looking on github.

The issue it relates to is: https://redmine.pfsense.org/issues/159

Actions #3

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

Actions #4

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?

Actions #5

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.

Actions #6

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.

Actions #7

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)

Actions #8

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.

Actions

Also available in: Atom PDF