echo | openssl s_client -connect smtp.office365.com:587 -starttls smtp 2>/dev/null | openssl x509 -noout -dates
notBefore=May 22 07:01:10 2020 GMT
notAfter=Aug 20 07:01:10 2020 GMT
Monthly Archives: July 2020
nmap on openvz host seems down
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 0.60 seconds
Raw packets sent: 2 (56B) | Rcvd: 0 (0B)
nmap --unprivileged -e venet0 -sV -v -v -T4 www.srv24x7.com
*WARNING* Binary location for [CHATTR] [/usr/bin/chattr] in /etc/csf/csf.conf is either incorrect, is not installed or is not executable
*WARNING* Binary location for [CHATTR] [/usr/bin/chattr] in /etc/csf/csf.conf is either incorrect, is not installed or is not executable
*WARNING* Missing or incorrect binary locations will break csf and lfd functionality
yum install e2fsprogs
csf -r
Error: Package: lsphp73-imap-7.3.20-1.el7.x86_64 (litespeed) Requires: libc-client.so.2007()(64bit)
yum install epel-release
yum install openlitespeed
Installing : libmcrypt-2.5.8-13.el7.x86_64 23/27
Installing : lsphp73-pecl-mcrypt-1.0.3-1.el7.7.3.x86_64
borg backup
borg init -e repokey /path/to/repo
borg create /path/to/repo::Day1 ~/public_html
borg create -v --stats /path/to/repo::Day2 ~/public_html
performance-critical code (chunking, compression, encryption) is implemented in C/Cython
local caching of files/chunks index data
quick detection of unmodified files
lz4 (super fast, low compression)
zstd (wide range from high speed and low compression to high compression and lower speed)
zlib (medium speed and compression)
lzma (low speed, high compression)
postfix remove received header
vi /etc/postfix/header_checks
/^Received:.*with ESMTPSA/ IGNORE
/^Received:/ IGNORE
/^X-Originating-IP:/ IGNORE
/^X-Mailer:/ IGNORE
/^Mime-Version:/ IGNORE
vi /etc/postfix/main.cf
mime_header_checks = regexp:/etc/postfix/header_checks
header_checks = regexp:/etc/postfix/header_checks
postmap /etc/postfix/header_checks
postfix reload
cloudflare style SNI proxy
git clone https://github.com/dlundquist/sniproxy.git
yum groupinstall "Development Tools"
yum install autoconf automake curl gettext-devel libev-devel pcre-devel perl pkgconfig rpm-build udns-devel
cd sniproxy
./autogen.sh && ./configure && make dist
rpmbuild --define "_sourcedir `pwd`" -ba redhat/sniproxy.spec
yum install /root/rpmbuild/RPMS/x86_64/sniproxy-0.6.0+git.10.g822bb80-1.el7.x86_64.rpm
sniproxy -c /etc/sniproxy.conf
Centos 7 x86_64:
sniproxy-0.6.0+git.10.g822bb80-1.el7.x86_64.rpm.gz
laravel hacked database
Its serious security issue this default Laravel configuration. because .env file and database credentials are not protected. So you need to create a .htaccess file in same folder to protect it:
<Files .env> order allow,deny Deny from all </Files> <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule>
root remove password
passwd -d root
shell access using web
yum install shellinabox
adduser webuser
https://xx.xx.xx.xx:42000/
shell.server.com login:
directadmin exim smarthost
vi /etc/exim.conf
spamgateway_smarthost_router:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
condition = "${perl{check_limits}}"
transport = spamgateway_smarthost_transport
route_list = $domain mx.smarthost.com::587
spamgateway_smarthost_transport:
driver = smtp
hosts_require_tls = *