draft

rc.local not run while machine startup, maybe the rc.local file does not have the x(execute) auth

update and save iptables before reboot

unbind mac

svn cleanup less the drive space

https://unix.stackexchange.com/questions/65068/why-ssh-takes-a-long-time-to-connect

make UseDNS no

GSS no

for fast to connect to ssh remote

apache log dir need rx auth

no need to restart

grep '2018-10-26' /var/log/wol_client/wol_client.log|awk '{if($6=="0"){for(i=3;i<8;i++){$i=""}}else{$0=""}if($0!=""){print $0}}'

look rc.local

essential skill crontab all user

rc.local

cron.houly script need +x

apache's execute method file_put_contents need the auth to write, apache run no by root, so chmod 777 the file

python global define to change

cron.houly script need +x

apache's execute method file_put_contents need the auth to write, apache run no by root, so chmod 777 the file

python global define to change

sudo apt-get install curl && curl -L https://bootstrap.saltstack.com -o install_salt.sh && sudo sh install_salt.sh -P

sudo apt-get install curl && curl -L https://bootstrap.saltstack.com -o install_salt.sh && sudo sh install_salt.sh -M

SVN cm error maybe there are some .svn in the subdirectory

Ansible trouble shooting

1, get error below in client "/var/log/auth.log" file after ansible host ran the ping command return fault:

sshd[29378]: Connection closed by 10.17.64.13 [preauth]
10.17.19.250 | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: Connection to 10.17.19.250 timed out while waiting to read\r\n",
    "unreachable": true
}

solved:

iptables INPUT policy was DROP, although the ansible host 10.17.64.13 was accept, but the state wasn't be setted, so I should add this policy

"iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT"

solved 2 from bubie liu:

Should use the right user to execute ansible host command

Protect Your Website

Welcome, this is the second time I rebuild this my personal website for recording some tips and documents.
After by hacked yesterday, I realize that your host will be hacked in some day whatever process the host running or however the host providing service.

Some article I lost:

vim tips

sed, awk usage

iptables, ipset, pfctl, netsh advfirewall firewall

dhcp failover configure

trap usage in shell script

manage deamon with supervisor

syslog date different from machine time and python import date module