iptables unban ip and ban entire subnet
iptables unban ip List entries with line numbers iptables -L -v --line-numbers Delete entry iptables -D name_of_chain number_of_line_with_IP_that_you_want_to_delete Let’s imagine that we want to unban...
View ArticleCRITICAL | sd-XXXX.host.net | (Return code of 255 is out of bounds)
So!, My nagios was returning a CRITIAL error on one of my servers… CRITICAL | sd-XXXX.host.net | (Return code of 255 is out of bounds) and httpd server wasn’t responding…. I think that problem was on...
View ArticleEnter passphrase for key id_rsa.pub
So!, I was trying to SSH a host… Somehow it was requesting id_rsa.pub……… and asking for an password! … This is how I solved it… ssh -v -i path/to/id_rsa username@host.tld !!
View ArticleCatch all HTTP GET / POST requests on a Linux server…
GETs ngrep -q '^POST .* HTTP/1.[01]' POSTs ngrep -q '^POST .* HTTP/1.[01]'
View Articleletsencrypt renew – 404 – Detail: Invalid response
So!, letsencrypt renew output Domain: www.domain.com Type: unauthorized Detail: Invalid response from http://www.domain.com/.well-known/acme-challenge/WLpdvugG3YzC53RTrZMJcYWsRqcj64vWLw43HNBkMN6: nginx...
View ArticleComposer on CentOS 7
You need to have PHP installed before. Here y’a go… Under root….. yum -y update Switch into the temp directory. cd /tmp Install Composer using cURL curl -sS https://getcomposer.org/installer | php Make...
View ArticleFATAL -> Failed to fork.
While I was trying to preform an apt-get upgrade i got FATAL -> Failed to fork. error. According to some fellows around, this issue was probably caused due to the lack of memory!, and it was…
View Article/.well-known/acme-challenge/ – 404
1 renew failure(s), 0 parse failure(s) IMPORTANT NOTES: - The following errors were reported by the server: Domain: subdomain.domain.com Type: unauthorized Detail: Invalid response from...
View Articleyum-update – /boot/ no disk space
While I was trying to update a CentOS server… I got an error saying that /bott/ didn’t had enough disk space…… Sumário de erros ------------- Requisitos de disco: São precisos pelo menos mais 30MB de...
View ArticleCan’t locate CGI/Carp.pm in @INC & Can’t locate LWP/Simple.pm in @INC
[Thu Mar 09 02:23:43.435879 2017] [cgi:error] [pid 28444] [client 94.63.XXX.XXX:54192] AH01215: Can’t locate CGI/Carp.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5...
View ArticleCentOS – Enable the mod_proxy modules in the HTTPD
In our /etc/httpd/conf/httpd.conf lets see if we have the following lines on it. Uncomment them or add them. LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module...
View ArticleCert not yet due for renewal – force renew
[root@sd-8XXX pjrf]# /usr/local/sbin/certbot-auto renew >> /var/log/le-renew.log Saving debug log to /var/log/letsencrypt/letsencrypt.log Cert not yet due for renewal Cert not yet due for...
View ArticleLinux – Sort unique IP from Apache log and count entries
Usefull! cat /path/access.log | awk '{print $1}' | sort -n | uniq -c | sort -nr | head -50
View ArticleName-based virtual hosting with Nginx
https://bneijt.nl/blog/post/name-based-virtual-hosting-with-nginx/
View Articledashboard for VMware, SNMP, REST API and more
Simple dashboard system for sysadmins with modules for VMware, SNMP, REST API and more SysAdminBoard is a simple dashboard system written in Python, HTML and Javascript and served on a simple CherryPy...
View ArticleSFTP allow user to login via SFTP
If we are just allowing both on AllowUsers in file /etc/ssh/sshd_config, new users won’t be allowed to access the server. So!, lets edit it a add the new user. Find AllowUser line and add it there....
View Articlersync – protocol version mismatch — is your shell clean?
protocol version mismatch — is your shell clean? (see the rsync man page for an explanation) rsync error: protocol incompatibility (code 2) at compat.c(174) [sender=3.1.0] Are you trying to rsync to a...
View ArticleMeltdown & Spectre – CentOS
This is, for what I’v read about, the two main things that we need to have updated… kernel-3.10.0-693.11.6.el7.x86_64 microcode_ctl-2.1-22.2.el7.x86_64 Check them trought uname -r and dmesg | grep...
View Articlefail2ban – remove ip from ban
https://serverfault.com/a/760324/152273 please give some votes up to the author! see also http://www.digitalwhores.net/linux/iptables-unban-ip/
View Articlefail2ban.actions [14644]: NOTICE [sshd] 113.131.58.142 already banned
Meanwhile in a new VPS… 2018-04-18 19:56:42,211 fail2ban.actions [14644]: NOTICE [sshd] 113.131.58.142 already banned 2018-04-18 19:56:43,213 fail2ban.actions [14644]: NOTICE [sshd] 113.131.58.142...
View Article