ป้องกันโดนยิงเครื่อง server
#การใช้ netstat ตรวจสอบการถูกยิงด้วย syn คำสั่ง netstat -ntu | grep SYN_RECV | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nrอันนี้จะบอกว่..
https://www.squid-cache.org/Versions/
cd /tmp
wget http://www.squid-cache.org/Versions/v3/3.4/squid-3.4.9.tar.gz
tar xvfz squid-3.4.9.tar.gz
cd squid-3.4.9
./configure --prefix=/usr/local/squid
make && make install
#creat cache disk
chmod 777 /usr/local/squid/var/cache -R
chmod 777 /usr/local/squid/var/log -R
/usr/local/squid/sbin/squid -z
#run squid
/usr/local/squid/sbin/squid
#reconfig
/usr/local/squid/sbin/squid -k reconfig
#check
ps aux | grep squid && netstat -tulpn | grep 3127
tail /usr/local/squid/var/logs/cache.log
tail -f /usr/local/squid/var/logs/access.log
vim /usr/local/squid/etc/squid.conf
# Recommended minimum configuration:
acl myip src 122.155.6.12
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 443 # https
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access deny to_localhost
http_access allow localhost
http_access allow myip
http_access deny all
http_port 888
#cache_dir ufs /usr/local/squid/var/cache/squid 100 16 256
cache deny all
cache_dir null /tmp
coredump_dir /usr/local/squid/var/cache/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
dns_v4_first on #Access google
forwarded_for delete #below, what it do. c+v
request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all
user:pass https://stackoverflow.com/questions/3297196/-
November 24, 2014
#การใช้ netstat ตรวจสอบการถูกยิงด้วย syn คำสั่ง netstat -ntu | grep SYN_RECV | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nrอันนี้จะบอกว่..
find /home/*/domains/*/public_html/ -maxdepth 2 -type f -name '.htaccess' -print0 | xargs -0 grep -il '(py|exe|php)' find /home/*/domains/*/public_htm..
How to set time log proftp same Server (OS: Debian + CP: DirectAdmin) 1. edit proftpd.conf vim /etc/proftpd.conf 2. edit to config TimesGMT off SetEnv..
use “find” cgi/perl file in web server with directadmin find /home/*/domains/*/public_html/cgi-bin/ -iname *.cgi -ls find /home/*/domains/*/public_htm..
Ploblem: forget MySQL root password Solutions: Recover(hack) MySQL root password 1. Login as root 2. Stop the MySQL server by using command /etc/init...
ยกตัวอย่างเช่น ssh จากเครื่อง A ไปเครื่อง B โดยไม่ใช้รหัสผ่านในการ ssh @เครื่อง A ssh-keygen -t rsa (มีอะไรขึ้นมาก็กด enter ผ่านไปให้หมด แล้วพิมพ์คำสั..