Skip to content

Instantly share code, notes, and snippets.

View castironclay's full-sized avatar

castironclay castironclay

View GitHub Profile
@castironclay
castironclay / zte_send_public_ip_sms.txt
Last active May 10, 2021 00:34
ZTE Send public IP sms
#!/bin/bash
until ping -I usb0 -c 1 192.168.0.1 >/dev/null 2>&1; do sleep 1; done
generate_pub_ip ()
{
current_ip=$(curl ifconfig.io)
first_octet=$(echo $current_ip | awk -F "." '{print $1}')
second_octet=$(echo $current_ip | awk -F "." '{print $2}')
third_octet=$(echo $current_ip | awk -F "." '{print $3}')
fourth_octet=$(echo $current_ip | awk -F "." '{print $4}')
@Anachron
Anachron / wg_install.sh
Created June 24, 2019 07:15 — forked from sethenoka/wg_install.sh
A script to spin up a Wireguard VPN server with Unbound recursive DNS in a hurry
#!/bin/bash
# This file is designed to spin up a Wireguard VPN quickly and easily,
# including configuring a recursive local DNS server using Unbound
#
# Make sure to change the public/private keys before running the script
# Also change the IPs, IP ranges, and listening port if desired
# iptables-persistent currently requires user input
# add wireguard repo
sudo add-apt-repository ppa:wireguard/wireguard -y
@mayorova
mayorova / README.md
Created August 10, 2017 14:44
Mutual SSL in NGINX

Securing traffic to upstream servers with client certificates

Info: https://www.nginx.com/resources/admin-guide/nginx-https-upstreams/

Creating and Signing Your Certs

Source: http://nategood.com/client-side-certificate-authentication-in-ngi

This is SSL, so you'll need an cert-key pair for you/the server, the api users/the client and a CA pair. You will be the CA in this case (usually a role played by VeriSign, thawte, GoDaddy, etc.), signing your client's certs. There are plenty of tutorials out there on creating and signing certificates, so I'll leave the details on this to someone else and just quickly show a sample here to give a complete tutorial. NOTE: This is just a quick sample of creating certs and not intended for production.