mkdir -v -p /sftp/root/${USER}/home chown root.root /sftp/root/${USER} mount –bind //${DIR} /sftp/root/${USER}/home useradd -g tomcat -s /sbin/nologin ${USER} sshd_config Match Group tomcat AllowTcpForwarding no ForceCommand internal-sftp -u 0002 -d home ChrootDirectory /sftp/root/%u All folder must have permission as 777, so I […]
ssh tunnel squid proxy setup
SSH is a very secure encrypted connection. Much much easier to setup then a VPN. its quite easy to setup, on the server side all we need is Open SSH and Squid on the client side Windows we can use […]
How to buy bitcoin
Lets get into the world of digital coins 1. Open the playstore and install Mycelium Write your key (set of 20 words on a paper and in a very safe place) if someone steals this key it will be possible […]
varnish for wordpress
/etc/yum.repos.d/varnish.repo [varnishcache_varnish41] name=varnishcache_varnish41 baseurl=https://packagecloud.io/varnishcache/varnish41/el/6/$basearch repo_gpgcheck=1 gpgcheck=0 enabled=1 gpgkey=https://packagecloud.io/varnishcache/varnish41/gpgkey sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300 OK, ready then yum clean all yum install varnish Check the version: # /usr/sbin/varnishd -V varnishd (varnish-4.1.8 revision d266ac5c6) here is my varnish default configuration /etc/sysconfig/varnish NFILES=131072 MEMLOCK=2000 NPROCS=”unlimited” […]
ipset and iptables
Got IP zones from the internet: wget http://www.ipdeny.com/ipblocks/data/countries/all-zones.tar.gz gunzip -d all-zones.tar.gz ; tar -xvf all-zones.tar Then with ipset ipset create onlyita hash:net hashsize 64000 while read ip; do echo $ip ; done < it.zone Iptables: iptables -N countryfilter iptables -A […]
Deploy Weblogic bash script
To deploy a simple ear I did: ${JAVA_BIN} -cp ${WL_JAR} weblogic.Deployer -adminurl t3://${HOST_NAME}:${HOST_PORT} -user ${HOST_USER} -password ${HOST_PASS} -targets ${SERVER} -deploy -upload ${TMP_DIR}${DEPLOYEAR} -name ${APPNAME} But on the second script I had to do a stop(kill) of the server, cleanup the […]
AWS Certified Solutions Architect Study Guide
AWS Certified Solutions Architect Study Guide ( old post version here) 1) EC2 – Elastic Computer #EC2 STORAGE# EC2 support 2 types of block devices does Amazon EC2 support, EBS and instance storage(ephemeral) Persistent Storage (EBS) “Elastic Block Store”: […]