iptables -t nat -I POSTROUTING 1 ! -o lo -j MASQUERADE
iptables -t nat -D POSTROUTING -j MASQUERADE
exclude local interface should fix systemd-resolved
iptables -t nat -I POSTROUTING 1 ! -o lo -j MASQUERADE
iptables -t nat -D POSTROUTING -j MASQUERADE
exclude local interface should fix systemd-resolved
grep -n "Table structure" database.sql sed -n '[starting_line_number],[ending_line_number] p' database.sql.sql > database_one_table.sql
systemctl stop firewalld.service
curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d ' { "transient": { "cluster.routing.allocation.disk.watermark.low": "90%", "cluster.routing.allocation.disk.watermark.high": "95%", "cluster.routing.allocation.disk.watermark.flood_stage": "98%" } } '
rm -f /etc/resolv.conf
ln -sv /run/systemd/resolve/resolv.conf /etc/resolv.conf
ssh -o IdentitiesOnly=yes 192.168.0.100
Memory detection in LXC containers
[ERROR] [T0] [LICENSE] License key operation failure: ERR LR.R: Memory limited license cannot be used on server with more than 8GB memory.
lxc config set web-srv security.syscalls.intercept.sysinfo=true
lxc restart web-srv
For older OS setup cron:
certbot renew –post-hook “nginx -s reload”
List the services that need restart:
vim /etc/needrestart/needrestart.conf
$nrconf{restart} = 'l';
/scripts/whoowns domain
or
grep domain /etc/userdomains
mysql> ALTER USER 'some_user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'some_password';
lsof /etc/sudoers
kill -9 process_id
SELECT CONCAT("GRANT SELECT ON ",SCHEMA_NAME,".* TO 'test_user'@'localhost';")
FROM information_schema.SCHEMATA
WHERE SCHEMA_NAME NOT LIKE 'mysql';
bash to verify root password:
sshpass -p testword ssh [email protected]
or:
pamtester system-auth root authenticate
Password:
pamtester: successfully authenticated
locale -a | grep LT
if nothing found:
locale-gen lt_LT.UTF-8
Generating locales (this might take a while)...
lt_LT.UTF-8... done
Generation complete.