分类 Linux/unix/mac articles

fail2ban处理nginx下的恶意扫描

最近听说同行公司的数据库被人暴了,老大要求将我们自己的站点也做下检查。在查看nginx日志时,同样发现有人进行过恶意扫描。同时也为了防止别人恶性来公司站点上扒取数据。所以决定通过fail2ban配合iptables自动封掉这些IP。 发现的恶意扫描日志: 1access.log:112.122.134.43 - - [06/Oct/2012:21:27:22 +0800] "HEAD /flashfxp.zip HTTP/1.1" 404 0 "-" "Mozilla/4.0 (compatible; MSIE……

Continue reading

pgrep无法匹配问题

在linux中查看进程信息,经常要用到pa auxf,具体到某个进程的时候,又需进行grep管道。如:ps auxf|grep java|grep -v grep ,即然这么长,可以不可以简化呢?当然可以,如果还是使用ps命令的话,可以改为ps auxf|grep jav[a],这样就不用排除自身了。不过感觉命令还是长了点,能不能再简点,可以,使用p……

Continue reading

linux主要配置文件总结

/boot目录,kernel相关部分 /boot/symvers-%{KRELEASE}.gz 保存着内核中所有符号的crc值 /boot/System.map-%{KRELEASE} 给kernel使用的符号表(symbol table) /boot/vmlinuz-%{KRELEASE} 可引导的、压缩的内核 /boot/initrd-%{KRELEASE}.img 包含了支持 Linux 系统两阶段引导过程所需要的必要可执行程序和系统文件 /boot/config-%{KRELEASE} 包括kernel的make config /boot/message cpio格式的打包文件,存放Grub的配置信息,里……

Continue reading

linux进程状态

linux系统最常用的命令莫过于ps,经常要用其查看linux的进程和线程情况。此文我们着重来看进程 。进程又分为以下几种状态: 运行(正在运行或在运行队列中等待) 中断(休眠中, 受阻, 在等待某个条件的形成或接受到信号) 不可中断(收到信号不唤醒和不可运行, 进程必须等待直到有中断发生) 僵……

Continue reading

LVM分区无损增减

LVM是建立在硬盘和分区之上的一个逻辑层,来提高磁盘分LVM区管理的灵活性。其结构为:PV——VG——LV——PE,LVM分区比较灵活的一个功能就是可以无损更改分区大小。目前我现网中的服务器也使用的是LVM分区,目前也遇到了某分区分间不足的问题,所以在测试环境上演练下更改分区大小……

Continue reading

49个备份与恢复软件

Backup—Network 1. <a href="http://www.amanda.org/">AMANDA</a> AMANDA stands for "Advanced Maryland Automatic Network Disk Archiver," and it's a very popular enterprise backup system that supports disk, tape and optical media backups. A cloud-based service that utilizes the same technology is available through <a href="http://www.zmanda.com/">Zmanda</a>, which is owned by Carbonite. Operating System: Windows, Linux, OS X 2. <a href="http://backuppc.sourceforge.net/">BackupPC</a> This network backup system can archive large numbers of files to local or networked disk storage. It uses pooling and compression to make the archived files as small as possible, reducing storage hardware capacity requirements and costs. Operating System: Windows, Linux 3. <a href="http://www.bacula.org/">Bacula</a> The Bacula website boasts, "According to Source Forge statistics (rank and downloads), Bacula is by far the most popular open source program backup program." It offers enterprise-grade……

Continue reading

21 of the Best Free Linux Backup Tools

Backup software is used to perform a complete back up of a file, data, database, system or server. It enables users to make a duplicate of everything contained on the original source. This type of software is also used to perform a recovery of the data or system in the event of a disaster. Making file backups is an essential activity for all users,yet many users do not take adequate steps to protect their data. Whether a computer is being used in a corporate environment, or for private use, the machine’s hard disk may fail without any warning signs. Alternatively, some data loss occurs as a result of human error.Without regular backups being made, data will inevitably be lost even if the services of a specialist recovery organisation are used. Whilst it……

Continue reading

解决linux停在starting automount无法启动

公司的一台centos 6.0 X64系统测试机,把root密码给了好几个组的人用。天晓得他们在上面折腾什么!过了几天我要测试mysql-cluster,刚好少一台机器。结果发现登录不上了,我原以为其他组的人改了密码。问了他们,他们也说登录不了。本想重启下或重置下密码就能解决了!结果按上……

Continue reading

shell 生成随机数与随机字符串

一、生成随机数 1、使用系统的 $RANDOM 变量 1[root@361way ~]# echo $RANDOM 214436 2、增加整数实现范围 $RANDOM 的范围是 [0, 32767] ,如需要生成超过32767的随机数,可以用以下方法实现。 生成40000~50000的随机数 1#!/bin/bash 2function rand(){ 3 min=$1 4 max=$(($2-$min+1)) 5 num=$(($RANDOM+1000000000)) #增加一个10位的数再求余 6 echo $(($num%$max+$min)) 7} 8rnd=$(rand 40000 50000) 9echo $rnd 10exit 0 3、使用date +%s%N 1#!/bin/bash 2function rand(){ 3 min=$1 4 max=$(($2-$min+1)) 5 num=$(date +%s%N) 6 echo $(($num%$max+$min)) 7}……

Continue reading

Latest articles

Categories

Tags

ACL AD AES AI Alpine Android Anpic Ansible Apache Apm Apparmor Appfog Apr Apt-Get Aria2 Array Atlassian Atop Audit Awk AWS Awstats Axel Azure Backdoor Backup Bamboo Bash Bat Benchmark Bigdata Bin Bind Bitwise Blockchain BMC Book Bootstrap Brocade Bsd C1000 Cache Capistrano Catlog CDH5 Centos Centos7 Chatops Chattr Check_mk Checkinstall Cisco CL210 Clickhouse Cloud Cloud-Desktop Cmdb Cms Cobbler Collectd Comm Compress Confd Conver Corosync Cpu Crontab Crunchbang Css Curl C语言 Date DDOS Decode Dell Desktop Devops Df Dhcp Diff Diskpart DISTINCT Django DNS Docker Dos2unix Dpkg Drupal Duckdb EKS ELK Etcd Excel Fail2ban Fastcgi Fdisk Fiddler Find Firewalld Flask Flvtool Ftp Function Fuser GCP Geek Ghost Gin Git Github Gitlab Glances Glusterfs Go Godaddy Golang Google Gooupadd Grafana Graphviz Gravatra Grep Grub2 Hadoop Haproxy Hardware HBA HCIE Heartbeat Helm Hexdump Hhvm History Hotspot Html Http/Html/Web Http/Html/Web Httplogs Https HttpWatch Huawei Huaweicloud Hugo IBM Icmp Iconv Ifconfig IIS InfluxDB Ingress InnoDB Inotify Iopp IOS Ipmitool Iptables Iredmail Iscsi Isito It-News Java JavaScript Jdk Jenkins Jinja2 Jira Join Joomla K3s K8s Kdump Keepalived Kernel Kingate KVM Lamp Last Leetcode Lib Linux Linux高级篇 Ln Ls Lsi Lsof Lvm Lvs Mac Mail Man Mark Markdown Matplotlib Maven Memcached Microservice Mimikatz Mkdocs Mkpasswd Mmonit Mod_jk Mongodb Monit Monitor Mono Moodle Mosh Mount Mplayer Mpm Mrtg Mtr My.cnf Mysql Mysqlbinlog Mysqld_multi MySQLdb Mysqldump Mysqlhotcopy Nagios Nc Nethogs Netlify Nexus Nfs Nginx Nmon Nocatlog Node.js Nrpe Ntfs Ntop Ntp Obs Ocr Open-Falcon Openbox Opencv Openldap OpenResty Openssl Openstack Oracle Oswatch Paas Pacemaker Pam Pandas Parted Pcp Pcre Pdf Percona Perl Pexpect Pgrep Php Php-Fpm Ping Plsql Develope PM Postfix PostgreSQL Powershell Prettify Proc Prometheus Puppeteer Pushd Pwgen Pxe Pyecharts Python Python模块 QoS Radmin Raid Rdesktop Read Redhat Redis Redmine Regex Rh134 RH318 RH442 RHCA RHCE Rhel7 Rhel8 RHEV Rm Rman Rootkit Route Rpm Rpmforge Rrdtool RSA Rsync Rsyslog Safe Saltstack Samba Scapy Screen SecureCRT Sed Selenium Selinux Seo Seq Session Set Shc Sheepdog Shell Shopt Sitemap Skydns Smokeping Snffier Snmp Socket Soft Sort Spider Sql Sqlserver Squid SRE Ss Ssh Sshpass Statuscode Strace Strings Su SublimeText2 Sudo Suse Svn Sysbench Syslog-Ng Sysstat Systemd T Tar TC Tcpcopy Tcpdump Tech Telecom Telnet Tencentcloud Tengine Test Testlink Threads Time Tmux Tomcat Touch Tr Tsar Twisted Ubuntu Udev Ulimit Unix Unixbench User-Agent Useradd Varnish VBA Vbs Vercel Vi Vim Visudo Vmstat Vmware Vnc Voice Vpn Vscode Vsftp Vsftpd Vue Watchdog Web Webcam Webistrano Wget Wiki Windows Wol Wordpress Workshop Wsl X-Windows Xampp Xcache Xmllint Xtrabackup Yule Yum Zabbix Zeromq Zip Zonetime Zookeeper 下载工具 云主机 云原生 代理 加密 古意 吐槽 圈里圈外 娱乐 字符串函数 安全 平台架构 推理 提权 故事汇 故障案例 数据结构 每日看点 民国史 生活 科学记录 站长管理工具 算法 管理 网站架构 翻墙 股票 行业 诗韵 负载均衡 远程管理 面试题

Links

Meta