- IP ETH0: 10.225.192.40/25
- IP IPIPTUN: 192.168.255.1/24
ip tu ad ipiptun mode ipip local 10.225.192.40 remote 10.225.192.46 ttl 64 dev eth0
ip ad ad dev ipiptun 192.168.255.1 peer 192.168.255.2/32
ip li se dev ipiptun up
| #!/bin/bash | |
| yum install -y cloud-init aria2 virt-install genisoimage | |
| aria2c -c -s10 -x10 http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 | |
| mv CentOS-7-x86_64-GenericCloud.qcow2 centos7.qcow2 | |
| qemu-img create -f qcow2 -b centos7.qcow2 master01.qcow2 8G | |
| echo -e "instance-id: master01-$(uuidgen|cut -d'-' -f1)\nlocal-hostname: master01.tuxmonteiro" > meta-data | |
| cat > user-data << EOF | |
| #cloud-config |
| # Create a folder for our new root structure | |
| $ export centos_root='/centos_image/rootfs' | |
| $ mkdir -p $centos_root | |
| # initialize rpm database | |
| $ rpm --root $centos_root --initdb | |
| # download and install the centos-release package, it contains our repository sources | |
| $ yum reinstall --downloadonly --downloaddir . centos-release | |
| $ rpm --root $centos_root -ivh centos-release*.rpm | |
| $ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | |
| # install yum without docs and install only the english language files during the process |
| ##TCP FLAGS## | |
| Unskilled Attackers Pester Real Security Folks | |
| ============================================== | |
| TCPDUMP FLAGS | |
| Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere) | |
| Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere) | |
| Pester = PSH = [P] (Push Data) | |
| Real = RST = [R] (Reset Connection) | |
| Security = SYN = [S] (Start Connection) |
| function dc_trace_cmd() { | |
| local parent=`docker inspect -f '{{ .Parent }}' $1` 2>/dev/null | |
| declare -i level=$2 | |
| echo ${level}: `docker inspect -f '{{ .ContainerConfig.Cmd }}' $1 2>/dev/null` | |
| level=level+1 | |
| if [ "${parent}" != "" ]; then | |
| echo ${level}: $parent | |
| dc_trace_cmd $parent $level | |
| fi | |
| } |
| class MapInline { | |
| private Map<> inline(String id) { | |
| return Stream.of(new AbstractMap.SimpleImmutableEntry<>("environment", id)).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); | |
| // OR Stream.of(id).collect(Collectors.toMap(i -> "environment", Function.identity())); | |
| } | |
| } |
| package com.blazemeter.demo; | |
| import org.apache.jmeter.config.Arguments; | |
| import org.apache.jmeter.config.gui.ArgumentsPanel; | |
| import org.apache.jmeter.control.LoopController; | |
| import org.apache.jmeter.control.gui.LoopControlPanel; | |
| import org.apache.jmeter.control.gui.TestPlanGui; | |
| import org.apache.jmeter.engine.StandardJMeterEngine; | |
| import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui; | |
| import org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy; |
| private String buildFullHash(String body) throws IOException { | |
| final ByteArrayOutputStream obj = new ByteArrayOutputStream(); | |
| final GZIPOutputStream gzip = new GZIPOutputStream(obj); | |
| gzip.write(body.getBytes()); | |
| gzip.close(); | |
| byte[] fullhash = Base64.getEncoder().encode(obj.toByteArray()); | |
| return new String(fullhash); | |
| } |
| #!/bin/bash | |
| DOMAIN=$1 | |
| TOKEN="$GDNS_TOKEN" | |
| CONTACT="root.${DOMAIN}." | |
| GDNS="$GDNS_HOST" | |
| CHALLENGE="$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | base64 -b300 | sed -e 's/\+/_/g' -e 's/[= ]//g' -e 's/\//_/g' | cut -c1-200)" | |
| CURL="curl -v -HContent-type:application/json -HX-Auth-Token:${TOKEN}" | |
| DOMAIN_DATA="{\"domain\": {\"name\": \"${DOMAIN}\", \"type\": \"MASTER\", \"ttl\": \"86400\", \"notes\": \"A domain\", \"primary_ns\": \"ns1.${DOMAIN}.\", \"contact\": \"${CONTACT}\", \"refresh\": 10800, \"retry\": 3600, \"expire\": 604800, \"minimum\": 10800,\"authority_type\": \"M\"}}" |
| # Based from https://github.com/openresty/openresty/blob/v1.11.2.2/patches/nginx-1.11.2-ssl_cert_cb_yield.patch | |
| SSL: handled SSL_CTX_set_cert_cb() callback yielding. | |
| OpenSSL 1.0.2+ introduces SSL_CTX_set_cert_cb() to allow custom | |
| callbacks to serve the SSL certificiates and private keys dynamically | |
| and lazily. The callbacks may yield for nonblocking I/O or sleeping. | |
| Here we added support for such usage in NGINX 3rd-party modules | |
| (like ngx_lua) in NGINX's event handlers for downstream SSL | |
| connections. |