iptables allow all:
iptables -P INPUT ACCEPT && iptables -P FORWARD ACCEPT && iptables -P OUTPUT ACCEPT && iptables -t nat -F && iptables -t mangle -F && iptables -F && iptables -X && iptables-save > /etc/iptables/rules.v4
iptables allow all:
iptables -P INPUT ACCEPT && iptables -P FORWARD ACCEPT && iptables -P OUTPUT ACCEPT && iptables -t nat -F && iptables -t mangle -F && iptables -F && iptables -X && iptables-save > /etc/iptables/rules.v4
sed -n -e '/DROP TABLE.*`my_table`/,/UNLOCK TABLES/p' mydump.sql > table.sql
make sure table is correct:
egrep -h "DROP TABLE|CREATE TABLE" table.sql
DROP TABLE IF EXISTS `my_table`;
CREATE TABLE `my_table` (
domains=(domain1.com domain2.com domain3.com)
printf ' -d %s' ${domains[*]} | xargs certbot --apache
it runs such command:
certbot --apache -d domain1.com -d domain2.com -d domain3.com
alias_Domains=(`grep -m1 -oP '(?<=ServerAlias ).*' /etc/apache2/sites-enabled/website.conf`)
vim /etc/postfix/master.cf
amavis unix - - - - 2 smtp
-o smtp_tls_security_level=none
127.0.0.1:10025 inet n - - - - smtpd
-o smtp_tls_security_level=none
grep -ril word1 /some/path/to/search | xargs grep -i word2
pt-kill --kill-busy-commands=Query --run-time 1m --interval 1 --each-busy-time 30s --print --match-info "(select|SELECT)" --group-by=fingerprint
timedatectl | grep sync
System clock synchronized: no
sed -i 's/NTP\=/NTP=ntp.ubuntu.com/g' /etc/systemd/timesyncd.conf ; systemctl daemon-reload ; timedatectl set-ntp off ; timedatectl set-ntp on ; timedatectl | grep sync
System clock synchronized: yes
Unbound is a free, open-source, recursive, and validating DNS caching server. It uses DNS-over-TLS and DNS-over-HTTPS to encrypt connections between clients. Compared to Bind9, Unbound is lightweight and extremely fast.
echo "deb https://download.keydb.dev/open-source-dist $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/keydb.list
wget -O /etc/apt/trusted.gpg.d/keydb.gpg https://download.keydb.dev/open-source-dist/keyring.gpg
apt update
apt install keydb
paste from input to remote server ssh server_ip "cat - >> /tmp/some_file.txt" << "EOF" > asasas > asasas > asasas > EOF
wg set wg0 peer public_key remove
wg-quick save wg0; wg-quick down wg0; wg-quick up wg0;
su nobody -s /bin/sh -c ‘cat /tmp/some_test’
cat: /tmp/some_test: Permission denied
curl 'localhost:9200/_cat/indices?v'
bash script rotate-elasticsearch-index.sh
should to change regDate=”$yearReg\\-$monthReg\\-$dayReg” to match your index date format
curl -X PUT “localhost:9200/test_2022-08-02-test?pretty”
{
“acknowledged” : true,
“shards_acknowledged” : true,
“index” : “test_2022-08-02-test”
}
./rotate-elasticsearch-index.sh test localhost:9200 1
=== Fri Aug 12 16:35:37 EEST 2022 ===
——————————————-
INFO: Index: test_2022-08-11-110602
INFO: Found date: 2022-08-11
INFO: test_2022-08-11-110602 is less than 1 days old, doing nothing.
——————————————-
INFO: Index: test_2022-08-12-110602
INFO: Found date: 2022-08-12
INFO: testas_2022-08-12-110602 is less than 1 days old, doing nothing.
——————————————-
INFO: Index: test_2022-08-02-test
INFO: Found date: 2022-08-02
DELETE: test_2022-08-02-test is about to be deleted.