Questions tagged [hostname]

A hostname is a human-readable nickname that is assigned to a device connected to a computer network and that is used to identify the device.

A hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication such as the World Wide Web, e-mail or Usenet. Hostnames may be simple names consisting of a single word or phrase, or they may have appended a domain name, which is a name in a Domain Name System (DNS), separated from the host specific label by a period (dot). In the latter form, the hostname is also called a domain name. If the domain name is completely specified including a top-level domain of the Internet, then the hostname is said to be a fully qualified domain name (FQDN).

1162 questions
8
votes
2 answers

How to resolve a Bonjour domain name with JmDNS

As part of an app I'm developing, I need to be able to resolve the correct IP that corresponds with a Bonjour hostname. For example, I'm given jack.local and need to resolve it to 192.168.1.141 which is the IP address associated with jack. I've been…
Jake
  • 283
  • 2
  • 6
8
votes
2 answers

How to validate hostname (may be IP) and port number (CString)

I have an dialog for HTTP proxy configuration with hostname and port edit boxes. My question is how can I validate user input for correct hostname and port? May be I have to use some regular expression for hostname validation or there is some…
Julian Popov
  • 17,401
  • 12
  • 55
  • 81
7
votes
6 answers

Check if a string is a hostname or an ip-address in Java

I want to check if a string is a hostname or an ip-address in Java. Is there an API to do it or must I write a parser myself? The problem is complex because there are IPv4 addresses, short and long IPv6 addresses, short hostnames and FQDN host…
Horcrux7
  • 23,758
  • 21
  • 98
  • 156
7
votes
5 answers

How do I stop cloud-init from overwriting my hostname on AWS (CentOS)

I have a script that runs at boot (via rc.local) and sets my hostname based on the instance name it queries from the AWS CLI. It works, and at the end of the boot log it says " login:" At figured that cloud-init was overwriting my hostname, so I:…
CAJ
  • 297
  • 1
  • 3
  • 12
7
votes
1 answer

Failed to obtain name info for:[(1*.*.**.***,"name or service not known"),(1*.*.**.***,"name or service not known"),

016-03-07T09:10:16.992-0600 W NETWORK [HostnameCanonicalizationWorker] Failed to obtain name info for: [ (1*.*.**.***, "Name or service not known"), (1*.*.**.***, "Name or service not known"), (1*.*.**.***, "Name or service not known")…
rohith
  • 71
  • 1
  • 5
7
votes
2 answers

Android ADB connect empty host name

I use ADB over WiFi to connect to an Android device. When I type adb connect I get error empty hostname
naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
7
votes
1 answer

WEB API 2 Self-hosted hostname issues

I'am trying to make a self-hosted web api service. I followed a tutorial and it works fine on my local computer. localhost/api/values responds fine with the expected JSON. Now, I have a server binded to the DNS "myserver.mycompany.com". When I start…
Fred Mériot
  • 4,157
  • 9
  • 33
  • 50
7
votes
3 answers

Determining IP Address from URL in iOS

I need to get the IP address of a CDN from it's URL in an iOS app. From a long stack search, i've determined a method for doing this with the following: struct hostent *host_entry = gethostbyname("stackoverflow.com"); char *buff; buff =…
AddisDev
  • 1,791
  • 21
  • 33
7
votes
4 answers

Host name resolution without modifying the hosts file

I'm trying to figure out how if there's a way to make a hostname resolve to a certain IP without DNS or host file modification. Using C#, I'm making a request from client to server, but I have to use the hostname in the request so that the…
Cannoliopsida
  • 3,044
  • 5
  • 36
  • 61
6
votes
4 answers

Mac refusing to change hostname

I've been trying to figure out how to use postfix on my Mac and something has gone horribly wrong and I can't seem to fix it. I believe the problem is related to starting Postfix. Basically, the Mac seems to refuse to change its hostname. In bash,…
twistedpixel
  • 1,212
  • 4
  • 14
  • 33
6
votes
0 answers

macOS fetching computer name programmatically

I'd like to find how to extract my computer name programmatically, similar to the output of following terminal command scutil --get ComputerName. This value can also be found under "About this mac" -> "System Software Overview" as shown in the…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
6
votes
3 answers

is host name to ip a one-to-one mapping?

is host name to ip a one-to-one mapping? how can a host name have multiple ip addresses? according to Java's getAllByName, it returns a list of ips for a hostName, but its documentation seems to suggest otherwise or at least not explaining the one…
user881480
  • 5,005
  • 6
  • 32
  • 31
6
votes
3 answers

next.js: way to configure hostname and port through next.config.js

i am using next.js 9.5.x and I am looking for a way to configure hostname and port through next.config.js. I already searched the documentation about this, but I did not find a answer for this topic. I read already a series of .env files in the…
Marco B.
  • 83
  • 1
  • 4
6
votes
2 answers

Kube ingress with hostname (how to know IP to forward domain name?)

I see guides like this where setting up an Nginx Ingress (with ssl) requires you enter the host, i.e. echo1.example.com. I don't understand how you would be able to use the host specified if you didn't have the IP address (in your DNS, how would you…
6
votes
1 answer

How can I display the current url in swagger ui?

I would like to display the current url, eg.: https://{hostname}/{pathname}..., where I am running the swagger ui on instead of a hardcoded relative path, accordingly. Is there any possible solution to do so at least to get the current hostname?…
pink_panda
  • 100
  • 1
  • 6