Skip to content

How can I ping multiple IP addresses at the same time in linux

Just need install fping package for your distro

For Fedora, CentOS, AlmaLinux etc.

yum install fping -y

For Debian, Ubuntu etc.

apt install fping -y

We are ready now for tests:

fping -a -A -l host1 host2 host3 host4 etc...
fping -a -A -l cloudflare.com bbc.com yahoo.com google.com

Params:

  • -a  Show systems that are alive
  • -A Display targets by address rather than DNS name
  • -l Loop sending packets to each target indefinitely. Can be interrupted with Ctrl-C; statistics about responses for each target are then displayed.

 

ElasticSearch: failed to create query: field expansion matches too many fields

ElasticSearch error:

failed to create query: field expansion matches too many fields, limit: 1024, got: 1380

To fix it, add "indices.query.bool.max_clause_count: 2048" in elasticsearch.yml

echo 'indices.query.bool.max_clause_count: 2048' >> /etc/elasticsearch/elasticsearch.yml

Restart elasticsearch:

systemctl restart elasticsearch

 

Reset web interface login for VMWare ESXI

При разрешен публичен web interface-а на VMWare ESXI и/или SSH достъпа, много ботове се опитват да bruteforce-ват. Активира се вградена brute force защита. В предишната статия активирах логването с ssh ключ. Когато се логваме с ключ, дори да е блокиран уеб достъпа, логването с ключ работи. След като се логнем по ssh на сървъра, със следната команда reset-ваме web interface достъпа.

pam_tally2 --user root --reset

 

За да видим колко невалидни опити за логване са регистрирани:

pam_tally2 --user root

 

Enable ssh-keys login in VMWare ESXI

  • Via SSH:
ssh-copy-id root@esxihost

Enter the current password.

ssh root@esxihost

Enter the current password again.

After you are login with password just copy from local directory .ssh/authorized_keys to the /etc/ssh/keys-root/auhtorized_keys

root@esxihost# cat .ssh/authorized_keys >> /etc/ssh/keys-root/authorized_keys
root@esxihost# exit

And now you can login with ssh key to the VMWare ESXI