Skip to content

Instantly share code, notes, and snippets.

View ssinyagin's full-sized avatar

Stanislav Sinyagin ssinyagin

View GitHub Profile
@ssinyagin
ssinyagin / mk_client.sh
Created December 28, 2016 09:49
Create OpenVPN client config with embedded certificates
#!/bin/sh
# FILE: /etc/openvpn/client_configs/mk_client.sh
CLIENT=$1
if [ "$CLIENT" = "" ]; then
echo "missing client name" 1>&2
exit
fi
CL_CRT=/etc/openvpn/easy-rsa/keys/${CLIENT}.crt
@ssinyagin
ssinyagin / gen_config_single_bridged_client
Last active April 19, 2018 23:53
OpenVPN_against_censorship
#!/bin/sh
OVPNCFG=/etc/openvpn
RSADIR=/etc/openvpn/easy-rsa
IPV6PFX=fda5:e1a5:a801
if [ $# -ne 4 ]; then
echo "Usage: $0 VPNID FQDN NETNUM PORT" 1>&2
exit 1
fi
@ssinyagin
ssinyagin / wan_bachup_via_lte.sh
Created May 5, 2018 19:15
WAN backup routing via LTE
### WAN backup routing via LTE ###
# A Linux device, such as PC Engines APU, can be equipped with an LTE modem, but
# sometimes it's desirable to use the mobile connection only if the wired
# connection is unavailable.
# The following scenario is for Debian 9 on an APU box, but it's also
# applicable to any other Linux device.
# The DHCP client is tweaked to ignore the DNS server addresses that are