Questions tagged [fqdn]

A Fully Qualified Domain Name is a domain name that specifies its exact location in the hierarchy of the Domain Name System.

A Fully Qualified Domain Name is a that specifies its exact location in the hierarchy of the Domain Name System .

A FQDN consists of zero or more s followed by a top-level domain (e.g com, org, net etc.), separated by periods and terminated by a final period which represents the root zone.

Example: meta.stackoverflow.com.

As a special case, a single period . represents the root of the directory tree.

See also: RFC 1035: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION

152 questions
90
votes
13 answers

How to find FQDN of local machine in C#/.NET ?

How can you get the FQDN of a local machine in C#?
Gabe
31
votes
6 answers

Fully qualified domain name validation

Is there a quick and dirty way to validate if the correct FQDN has been entered? Keep in mind there is no DNS server or Internet connection, so validation has to be done via regex/awk/sed. Any ideas?
Riaan
  • 468
  • 1
  • 4
  • 14
27
votes
10 answers

Validate a hostname string

Following up to Regular expression to match hostname or IP Address? and using Restrictions on valid host names as a reference, what is the most readable, concise way to match/validate a hostname/fqdn (fully qualified domain name) in Python? I've…
kostmo
  • 5,782
  • 4
  • 37
  • 51
14
votes
2 answers

socket.getfqdn() returns no domain, but socket.gethostname() does?

I do not understand this: Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.getfqdn() 'SR-MW001' >>>…
guettli
  • 26,461
  • 53
  • 224
  • 476
13
votes
3 answers

How can I get the FQDN of the current host in Ruby?

I need to get the fully expanded hostname of the host that my Ruby script is running on. In Perl I've used Sys::Hostname::Long with good results. Google seems to suggest I should use Socket.hostname in ruby, but that's returning just the nodename,…
dvorak
  • 28,591
  • 4
  • 25
  • 29
10
votes
2 answers

Save the output of a powershell command in a variable and use it in batch script?

What I am trying to do is to save the output of a powershell command (run from a batch script) and use it in the batch script. Can you please advise me what to do? The power shell comand is: [System.Net.Dns]::GetHostByName((hostname)).HostName I…
fanciulla
  • 155
  • 4
  • 17
8
votes
5 answers

How do i set up the server's fully qualified domain name?

When i try to restart apache issueing /etc/init.d/apache2 restart i get the following messages: root@server:~# /etc/init.d/apache2 restart * Restarting web server apache2 …
reader
  • 129
  • 1
  • 1
  • 5
7
votes
3 answers

Obtain FQDN in Java

I am trying to obtain the FQDN of a windows machine in my domain, using Java code. I have tried the InetAddress.getByName("machine-1").getCanonicalHostName() but only returns the machine name. On the other hand if I ping "machine-1" I get the fully…
hgonzalez
  • 81
  • 1
  • 2
6
votes
4 answers

Why isn't Java's InetAddress class resolving ipv6 addresses to their FQDN?

I'm trying to write a simple program using Java that, given an IP in either version 4 or 6 format, will return its FQDN. The following code works fine when given an ipv4 address, but will only return the given address when an ipv6 address is…
user561877
  • 81
  • 1
  • 3
6
votes
4 answers

Translating NETBIOS domain into a FQDN (Fully Qualified Domain Name)

In short - How do I translate a NETBIOS domain to a FQDN ? Details: Assuming I'm in domain A and I have user credentials for domain B which has a trust relationship with domain A (I can authenticate the credentials). How do I get domain B's FQDN…
LiorE
  • 111
  • 4
  • 9
5
votes
2 answers

How to get a simple computer name (without the domain name) out of a full computer name in c#?

Can I get just a simple computer name (without the domain name) from a fully qualified name (can be with or without a domain name)? Is it possible for a computer name to have a dot (.) sign in it? (this question seems to be doing the reverse)
Louis Rhys
  • 30,777
  • 53
  • 137
  • 211
5
votes
2 answers

Validate FQDN in C#

Does anyone have a Regular Expression to validate legal FQDN? Now, I use on this regex: (?=^.{1,254}$)(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]{1,63}(?!-)\.?)+(?:[a-zA-Z]{2,})$) However this regex results in "aa.a" not being valid while "aa.aa" is valid.…
RRR
  • 3,421
  • 13
  • 48
  • 68
5
votes
0 answers

Android Search Domains / FQDN

There is a bug in Android in using a simple domain name ej: myservice.local etc In PCs you can use nslookup and you get the full domain name such as company.domain.com Then this domain can be used to create a socket in the android app. If I look in…
vallllll
  • 2,561
  • 5
  • 37
  • 75
4
votes
1 answer

Puppet Behaviour not consistent in Amazon VPC

I'm testing out puppet in Amazon VPC and found out its behavior is not consistent. In Amazon EC2, puppet works out perfectly fine. But while running puppet manifests in Amazon VPC, sometimes it runs properly..sometimes not. root@ip-10-0-0-123:~#…
Sanket Dangi
  • 1,155
  • 9
  • 16
4
votes
2 answers

get domain name from FQDN?

I am trying to get the NetBios name from a fully qualified Domain Name... the user inputs the FQDN and i convert to NetBios name for eg xyz.test.com (this is just an example, the FQDN an be anything) to its NetBios (i am not sure if it is called…
user175084
  • 4,210
  • 24
  • 108
  • 166
1
2 3
10 11