DAILY DOCDAILY DOC
Rust
Node
Notes
Ubuntu
Leetcode
  • it-tools
  • excalidraw
  • linux-command
Rust
Node
Notes
Ubuntu
Leetcode
  • it-tools
  • excalidraw
  • linux-command
  • linux
  • bash alias
  • chmod
  • linux useful command
  • date
  • extract translation from git diff
  • fail2ban
  • globbing
  • localhost
  • mail
  • memo 内存测试
  • nohup(no hang up)
  • setup env
  • ssh

    • ssh 教程
    • github clone
    • ssh.localhost.run 端口转发
    • ssh 安全
  • systemd service
  • 分析ubuntu系统登录日志文件
  • vpn

    • vpn 教程
    • Algo
    • clashX
    • firezone
    • lantern
    • pac 代理配置
    • Setup vpn
    • shadowsocks
    • VPN
    • VPN 速度优化
    • wireguard cron
    • 修改wireguard端口
  • webhook

VPN

wireguard

自动一键配置

wget -O wireguard.sh https://get.vpnsetup.net/wg

路由配置(国外ip走代理)

  • wireguard-allowedips-calculator

  • 国内ip cidr

手动配置(ubuntu)

  1. 安装 WireGuard
sudo apt-get update
sudo apt-get install wireguard
  1. 配置 WireGuard
nano /etc/wireguard/wg0.conf
[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = <服务器端私钥>

[Peer]
PublicKey = <客户端公钥>
AllowedIPs = 10.0.0.2/32

  1. 启动 WireGuard
wg-quick up /etc/wireguard/wg0.conf
wg-quick down /etc/wireguard/wg0.conf
  1. 配置防火墙
ufw enable 
ufw allow 51820/udp
# ufw delete allow 51820/udp 

wg # 查看链接状态 
  1. 安装 连接客户端wireguard 软件

IPScure VPN

IKEV2

IPsec/L2TP

yum update # update
wget https://git.io/vpnquickstart -O vpn.sh && sudo sh vpn.sh

ikev2

# Set up IKEv2 using default options
sudo ikev2.sh --auto
# Alternatively, you may customize IKEv2 options
sudo ikev2.sh

IPsec/XAuth

部署google BBR 拥塞控制算法

uname -r   # 查看 linux 内核版本 需满足版本 大于等于4.9

编辑 /etc/sysctl.conf文件 增加

net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

Open VPN

Reference

  • setup-ipsec-vpn
  • ikev2-howto
  • open-vpn-install
  • Google BBR 加速
  • wireguard
Last Updated:
Contributors: rosendo
Prev
shadowsocks
Next
VPN 速度优化