December 7, 2022

Our forbidden blacklisted ip addresses

Our forbidden blacklisted ip addresses (flood/crawlers, all of Chinese IDC ips): "101.199.125.250"; "101.36.96.0/19"; "101.36.112.0/20"; "103.72.144.0/22"; "109.248.144.159"; "111.7.100.20"; "111.7.100.21"; "111.7.100.22"; "111.7.100.23"; "111.7.100.24"; "111.7.100.25"; "111.7.100.26"; "111.7.100.27"; "111.7.100.28"; "111.90.143.184"; "118.193.41.0/24"; "118.26.36.0/22"; "123.58.208.0/20"; "13.59.112.0/24"; "152.32.168.0/21"; "152.32.192.0/19"; "152.32.208.0/20"; "162.55.86.53"; "198.2.220.173"; "20.78.0.0/17"; "208.100.0.0/18"; "209.141.32.0/19"; "218.92.139.102"; "36.99.136.0/24"; "4.231.35.28"; "45.227.253.206"; "45.77.150.223"; "50.87.0.0/16"; "54.245.141.157"; "64.124.8.0/24"; "95.211.0.0/16"; Let me know if there is any false-postive.

May 1, 2022

Use Monit to monitor and restart mariadb

Install monit standard Ubuntu version, then upgrade to latest: apt install monit -y service monit stop apt remove monit -y cd /tmp wget --no-check-certificate https://mmonit.com/monit/dist/binary/5.32.0/monit-5.32.0-linux-x64.tar.gz tar -xf monit-5.32.0-linux-x64.tar.gz cd monit-5.32.0 sudo cp bin/monit /usr/bin/monit sudo ln -s /etc/monit/monitrc /etc/monitrc Add database user, otherwise there will be many failed/aborted database connections (because of Monit’s auto check): CREATE USER 'monit'@'localhost' IDENTIFIED BY 'yourpassword'; FLUSH PRIVILEGES; Monit syntax: check process mysqld with pidfile /run/mysqld/mysqld. Read more

July 19, 2020

Use Varnish to block bad bots

Use Varnish to block bad bots: sub vcl_recv { if (req.http.User-Agent ~ "AspiegelBot" || req.http.User-Agent ~ "AutoKeyboard" || req.http.User-Agent ~ "Virus-Schutz" || req.http.User-Agent ~ "Dataprovider" || req.http.User-Agent ~ "YandexMetrika" || req.http.User-Agent ~ "Clarabot" || req.http.User-Agent ~ "cotoba_bot" || req.http.User-Agent ~ "baiduboxapp" || req.http.User-Agent ~ "DuckDuckGo-Favicons-Bot" || req.http.User-Agent ~ "360Spider" || req.http.User-Agent ~ "404checker" || req.http.User-Agent ~ "404enemy" || req.http.User-Agent ~ "80legs" || req.http.User-Agent ~ "Abonti" || req.http.User-Agent ~ "Aboundex" || req. Read more

July 15, 2020

Ubuntu 18.04/20.04安装/更新Hugo最新版

初版:2019-10-15 为方便使用,不要使用snap或git方式安装。 因为snap为了安全,对/var/www/只有只读权限 hugo new site ~/home/domain.com/ -v Ubuntu 18.04/20.04安装/更新Hugo最新版(0.74.2 Extended): cd /tmp wget https://github.com/gohugoio/hugo/releases/download/v0.74.2/hugo_extended_0.74.2_Linux-64bit.deb dpkg -i hugo_extended* rm hugo_extended*.deb 如果出现错误: (Reading database ... 66998 files and directories currently installed.) Preparing to unpack hugo_extended_0.58.3_Linux-64bit.deb ... Unpacking hugo (0.58.3) ... dpkg: error processing archive hugo_extended_0.58.3_Linux-64bit.deb (--install): trying to overwrite '/usr/local/bin/hugo', which is also in package hugo_extended 0.49 dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) 执行: rm -r /usr/local/bin/hugo locate hugo_extended 0. Read more

October 16, 2019

Memcached

Install/Update Memcached on Ubuntu 18.04: service memcached stop apt remove memcached -y cd /tmp wget http://www.memcached.org/files/memcached-1.5.19.tar.gz tar xvzf memcached-1.5.19.tar.gz cd memcached-1.5.19 ## enable sasl: ./configure --enable-sasl --prefix=/usr/local/memcached ./configure --prefix=/usr/local/memcached make && make test && sudo make install To check the version: /usr/local/memcached/bin/memcached -V >memcached 1.5.19 Monit: check process memcached matching /usr/local/memcached/bin/memcached start program = "/usr/bin/sudo /usr/local/memcached/bin/memcached -d -vv /var/log/memcached.log -t 32 -m 256 -u root -p 11211 -l 127.0.0.1 -c 10240 -U 0" if failed host 127. Read more

© Meken 2024

Powered by Hugo & Kiss.