Skip to content

Instantly share code, notes, and snippets.

View yf-hk's full-sized avatar
🎯
Focusing

yf-hk

🎯
Focusing
View GitHub Profile
@yf-hk
yf-hk / install-ikev2.sh
Last active June 2, 2023 07:11
Setup Strongswan IKEv2 VPN server on Debian 10 with Let's Encrypt
#!/bin/bash
apt update && apt upgrade -y
apt install strongswan strongswan-pki libcharon-extra-plugins net-tools wget certbot -y
DEBIAN_FRONTEND=noninteractive apt-get -y install iptables-persistent
HOST_NAME="vpn.example.com"
read -e -i "$HOST_NAME" -p "VPN host name: " HOST_NAME
HOST_NAME="${input:-$HOST_NAME}"
LOCAL_SUBNET="172.19.240.0/20"
@yf-hk
yf-hk / arch-setup.sh
Last active June 27, 2021 01:59
Arch Linux setup
#!/bin/sh
pacman -Syu
pacman -S base-devel go nodejs npm npm-check-updates certbot certbot-nginx wget tree xz socat git zsh cronie
#enable en_US.UTF-8
#vim /etc/locale.gen
locale-gen
localectl set-locale LANG=en_US.UTF-8
#bbr
echo "net.core.default_qdisc=fq" >> /etc/sysctl.d/bbr.conf
FROM alpine:latest
WORKDIR /opt
EXPOSE 443/tcp 500/udp 4500/udp
ENV HOST_NAME=
ENV LOGIN_USER=
ENV LOGIN_PASSWORD=
ENV LOCAL_SUBNET=172.19.240.0/20