Obter certificado do servidor para LDAPS no Linux

 Pegar certificado LDAPS:

1. Conecte-se ao servidor com openssl s_client

ex: openssl s_client -connect ldap.example.com:636 -showcerts

Isso pegará o cert sendo servido.

Salve isso em um arquivo

2. use openssl para inspecionar o cert

openssl x509 -noout -text -in nome_do_arquivo

testar conexão:
ldapsearch -H ldap://nome_servidor.example:389 -ZZ -x -D "cn=usuario,ou=nome,dc=example,dc=gov" -W -b "dc=example,dc=gov"

testar sem certificado
LDAPTLS_REQCERT=never ldapsearch -H ldap://nome_servidor.example:389 -ZZ -x -D "cn=usuario,ou=nome,dc=example,dc=gov" -W -b "dc=example,dc=gov"

 

- copiar certificado para store do sistema:
cp server.crt /usr/local/share/ca-certificates
update-ca-certificates

fonte: https://www.reddit.com/r/sysadmin/comments/1wibqqy/enabling_ldaps_from_linux_host_to_active/

Corrigir erro NATS no Segura

 

### erro Nats

orbit nats stop
orbit nats setup
orbit services reload
orbit nats stream reload
orbit services restart all
ls -lh /var/orbini/system/incdt/

ESXi enable remote syslog

 

esxcli system syslog config set --loghost=udp://10.20.0.27:514

esxcli network firewall ruleset set --ruleset-id=syslog --enabled=true 

esxcli network firewall refresh

esxcli system syslog reload

How to Install PHP 8.3 on Ubuntu 26.04, 24.04 and 22.04

 importar chave repo

sudo apt install -y ca-certificates curl
sudo curl -fsSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg

criar arquivo do repo - copiar texto a seguir, colar e executar no terminal

. /etc/os-release
ARCH="$(dpkg --print-architecture)"

case "$VERSION_CODENAME:$ARCH" in
  resolute:amd64|resolute:arm64|noble:amd64|noble:arm64|noble:armhf|jammy:amd64|jammy:arm64|jammy:armhf)
    printf '%s\n' \
      'Types: deb' \
      'URIs: https://packages.sury.org/php/' \
      "Suites: $VERSION_CODENAME" \
      'Components: main' \
      "Architectures: $ARCH" \
      'Signed-By: /usr/share/keyrings/deb.sury.org-php.gpg' | sudo tee /etc/apt/sources.list.d/php.sources > /dev/null
    ;;
  *)
    printf 'This PHP 8.3 workflow covers Ubuntu 26.04 on amd64/arm64 and Ubuntu 24.04/22.04 on amd64/arm64/armhf; this host reports %s/%s.\n' "$VERSION_CODENAME" "$ARCH" >&2
    false
    ;;
esac



apt update

apt upgrade -y


source: https://linuxcapable.com/how-to-install-php-8-3-on-ubuntu-linux/

Ubuntu 24.04 PHP OCI8 error

 

As oci8.so still expecting libaio.so.1, creating the following symlink resolves the issue:

ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1

Veeam NFS error

 ver processo porta 111

Get-Process -Id (Get-NetTCPConnection -LocalPort 111).OwningProcess

taskkill /f /pid <pid>


iniciar serviço veeam vpower nfs: 

net start VeeamNFSSvc

conferir o novo processo na porta 111

Get-Process -Id (Get-NetTCPConnection -LocalPort 111).OwningProcess



Apache get real IP from NGINX proxy

 

Apache get real IP from NGINX proxy 

nginx: 

set_real_ip_from 0.0.0.0/0;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;

service nginx reload

##################################
apache2:

a2enconf remoteip
a2enmod remoteip

pico /etc/apache2/conf-available/remoteip.conf
 

add:
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy <IP_NGINX>


service apache2 restart

Obter certificado do servidor para LDAPS no Linux

 Pegar certificado LDAPS: 1. Conecte-se ao servidor com openssl s_client ex: openssl s_client -connect ldap.example.com:636 -showcerts Isso ...

Mais vistos