Skip to content

Instantly share code, notes, and snippets.


Anoop P Alias AnoopAlias

View GitHub Profile
View cronaddsetrealip
wget -O /scripts/setrealip && chmod +x /scripts/setrealip && echo "5 * * * * root /scripts/setrealip" >> /etc/crontab
View setrelip
echo > /etc/nginx/conf.d/custom_include.conf
echo "set_real_ip_from;" >> /etc/nginx/conf.d/custom_include.conf
echo "set_real_ip_from;" >> /etc/nginx/conf.d/custom_include.conf
echo "set_real_ip_from $(hostname -i);" >> /etc/nginx/conf.d/custom_include.conf
for ip in $(cat /etc/ips|cut -d: -f1)
echo "set_real_ip_from $ip;" >> /etc/nginx/conf.d/custom_include.conf
nginx -s reload
View malware check
echo "*/10 * * * * root /opt/nDeploy/nDeploy_whm/abnormal_process_detector.cgi > /dev/null" >> /etc/crontab && systemctl restart crond
View nDeploy-4.10-51 upgrade standalone
yum -y --enablerepo=ndeploy upgrade
systemctl restart nginx
View nDeploy-4.10-51 upgrade cluster
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -m shell -a "yum -y --enablerepo=ndeploy upgrade"
yum -y --enablerepo=ndeploy upgrade
systemctl restart nginx
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -m shell -a "systemctl restart nginx"
cd /opt/nDeploy/conf/nDeploy-cluster/
ansible-playbook -i ./hosts cluster.yml
View gist:fdbd91554134038f11d6a7986f90e060
# Do on master
yum -y --enablerepo=ndeploy upgrade *nDeploy* gnusys-monitoring
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -a "yum -y --enablerepo=ndeploy upgrade *nDeploy* gnusys-monitoring"
ansible -i /opt/nDeploy/conf/nDeploy-cluster/hosts ndeployslaves -a "rm -f /opt/nDeploy/conf/XTENDWEB_MAXSCALE_SETUP_LOCK_DO_NOT_REMOVE"
cp -p /opt/nDeploy/conf/nDeploy-cluster/hosts /opt/nDeploy/conf/nDeploy-cluster/hosts.orig
/opt/nDeploy/scripts/ini2yaml < /opt/nDeploy/conf/nDeploy-cluster/hosts > /opt/nDeploy/conf/nDeploy-cluster/hosts.yaml
cp -p /opt/nDeploy/conf/nDeploy-cluster/hosts.yaml /opt/nDeploy/conf/nDeploy-cluster/hosts
View csf
echo "1 * * * * /usr/sbin/csf -e > /dev/null" >> /var/spool/cron/root
View sample_nginx.conf
user nobody;
worker_processes 1;
worker_rlimit_nofile 69152;
worker_shutdown_timeout 10s;
timer_resolution 1s;
thread_pool iopool threads=32 max_queue=65536;
pcre_jit on;
pid /var/run/;
error_log /var/log/nginx/error_log;
View install libmodsecurity
#Author: Anoop P Alias
rm -rf /opt/libmodsec ModSecurity
yum install gcc-c++ flex bison yajl yajl-devel curl-devel curl GeoIP-devel doxygen zlib-devel pcre-devel
git clone

Keybase proof

I hereby claim:

  • I am AnoopAlias on github.
  • I am gnusys ( on keybase.
  • I have a public key whose fingerprint is 3EDA E5B4 A4D8 E5A1 456E C3E3 3AE2 64F9 8754 DDD7

To claim this, I am signing this object:

You can’t perform that action at this time.