cluster – Can my Ceph nodes have the same hostname?

I have a high availability solution which requires me to have all my nodes using the same hostname. I’ve been tasked to use ceph cluster storage, but I just reached a dead end.

I can’t figure out how to configure ceph so that I can use the same hostname for different nodes, because I found out that ceph nodes names must match the hostnames of the machines they belong to, source.
Can anyone give me advice or show me how I can do so ?

Add Linux hostname to Windows DNS GUI

In Windows Server 2008 R2, and in an Active Directory Environment, how can I add an alias hostname to DNS, so that all workstation will know the internal ip address of that alias hostname?

I have a Linux web server, that contains some intranet resources.

Instead of accessing this server this way:

https://192.168.1.10/

I want users to be able to access this way:

https://someAliasNameWithoutAnyDots/

Basically, I’m trying to achieve, with Windows DNS, what you can achieve very easily in each workstation’s host file, but I want to do it in one place so that all computers (that get their dhcp/dns from Windows) will know the alias hostname of this linux server (which differs from this linux server’s actual hostname).

How do you do this in the DNS GUI of Windows Server 2008 R2? It seems like it only deals in fully qualified domain names, but in my case I don’t want “.com” (or .anything) to be included in the https address.

Azure Application Gateway backend hostname matching errors

Application gateway gives me an error:

‘Backend health’: ‘The Common Name (CN) of the backend certificate does not match the host header of the probe.’ for both backend instances.

But if I try to access scale set instances directly, the certificate is valid:

https://apitestss000000.mycorp.local/
and
https://apitestss000001.mycorp.local/

look fine and valid in browser

HTTP setting is set to ‘Pick hostname from backend target.’ If I set it to ‘Override with specific domain name’ and type in one of the hostnames like ‘apitestss000001.mycorp.local’, there is no error for this host, but still error for the other. Looks like ‘Pick hostname from backend target’ picks the wrong hostname from the scale set.

apache 2.4 – How to detect which virtual directory is used to resolved a hostname?

Have multiple websites served from a single Apache server, using a virtual directory, what is the best way to find which one is used to resolve a hostname? this can be a command-line tool similar to the following imaginary one:

$ apache-resolve foo.example.com
/etc/httpd/conf.d/bar.conf

Setting up a TCP-SNI proxy that dynamically forwards SSL traffic to any hostname that the SNI might contain

I’m firstly gonna summerize my goal:

I’ll setup a DNS server and configure my smart tv to use it. I’ll set the DNS server up so that requests to specific DNS zones will not actually be resolved, rather the DNS server will return the IP of my proxy server. The proxy server needs to accept any HTTPS request, inspect the SNI, and forward the request to the corresponding host. I cannot statically configure the hosts to which the proxy shall pass the incoming requests, as those hostnames are being “randomly” (= outside of my control) generated in a specific DNS zone.

So far I’ve looked into nginx’s ngx_stream_ssl_preread_module, as well as into HProxy. So far, I have not found a way to make them proxy pass the traffic to $requesthostname, it seems like you always need to specify backends to which you pass the traffic.

While inspecting HTTPS traffic on my local machine using mitmproxy, I realized that it behaves as I desire, in that it forwards all HTTPS requests to the corresponding hostnames. However, as I cannot install mitmproxy’s CA certificate on my smart tv, I cannot use it for this purpose.

Does anybody know a proxy software that serves my purpose, or a way to configure one of the proxyservers I mentioned in such a way that it behaves in such a manner?

Help is greatly appreciated, thanks in advance

nginx – Hostname won’t resolve correctly if apache ServerName isn’t localhost

We have a lamp centos 7 server in a datacenter, behind some sort of a Nginx proxy. We only have control over our centos server, we don’t know anything about the proxy/firewall or anything. We have installed SSL.

In httpd.conf, ServerName, the one that is not in <VirtualHost>, line 97

if ServerName localhost then the website loads correctly, HTTP only, you get this SSL error

 RSA certificate configured for example.com:443 does NOT include an ID which matches the server name 

if ServerName example.com then SSL loads correctly but if you try to access it either over HTTP or HTTPS you get access denied, just that, probably this error is from Nginx or something not sure

If we omit ServerName, line 97 we get

httpd: Could not reliably determine the server's fully qualified domain name

The datacenter support says

We tested port 80 & 443 for the server and they are open; it looks like a web configuration issue.

Find & replace for hostname in `~/.ssh/config` to run a different shell/`RemoteCommand` for a group of hosts?

I can ssh as normal into several hosts. I have sudo/su rights, so I often need to type that when I log into the server. Is there any way, in my ~/.ssh/config to automate that?

I have

Host *.example.com
IdentityFile ~/.ssh/id_rsa_projkey

I’d like ssh blah.example.com to still work as normal, where I get a regular shell. But then ssh su-blah.example.com to log me in, and then run sudo -i (or su), i.e. the equivalent of running ssh blah.example.com -t sudo -i. I see I can add RemoteCommand to the SSH config. Is there anyway to do a “pattern match” & text replace on the hostname in a SSH config?`

system installation – Ask for hostname in an Automated Server Isntall

I’m trying to install 20.04 with an auto install config file like this one:

version: 1
identity:
    hostname: hostname
    username: username
    password: $crypted_pass

But I want the install process to ask for the hostname because I’m installing a lab full of computers.

If I leave the hostname out I get an error during the install because hostname is required.

NGINX reverse proxy not forwarding the request hostname to docker container

Problem:

We’ve setup a docker container running on port 3002 and then configured port 3002 to /path/ on my domain www.example.com. There’s an express rest api is running on 3002 port container which outputs the req.hostname and when I make a request from let’s say www.abc.com, the consoled value of req.hostname is shown to be www.example.com instead of www.abc.com.

Nginx Conf

server {
    listen 443 ssl;
    ssl_certificate /etc/ssl/__abc.crt;
    ssl_certificate_key /etc/ssl/abc.key;

    listen 80 default_server;
    listen [::]:80 default_server;
    location  / {
        proxy_pass http://localhost:3001/;
        proxy_set_header Host $host;
    }
    location /path/ {
        proxy_pass http://localhost:3002/;
        proxy_set_header Host $http_host;
    }
}

What changes do I have to make so I can get the www.abc.com in consoled value?

linux: can both a web server and an email server be referenced in the hosts and hostname files?

Environment: CentOS, Nginx, Postfix / Dovecot, Digital Ocean Droplet

Question: Can you refer to both a web server and an email server in the hosts and hostname records? Is it better to have a separate email and web server to avoid any possible confusion?

Background: I have a web server hosted on a drop of Digital Ocean that I use for testing. I installed Postfix / Dovecot on this server and everything worked as expected. However, when I checked my settings in mxtoolbox, I received a warning.

Category: smtp
Host: mail.example.com
Result:  Reverse DNS is not a valid Hostname 

I checked my hosts and hostname files and none referenced the web server.

This is from me /etc/hosts archive.

# The following lines are desirable for IPv4 capable hosts
127.0.0.1 example.com example
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4

# The following lines are desirable for IPv6 capable hosts
::1 example.com example
::1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

This is from me /etc/hostname archive.

example.com

If I add a reference to the email server in these files, will that cause problems? If I remove the reference to the web server and add the email server, will that cause problems? Would it be better to keep these servers in separate drops?