WireGuard로 개인 VPN 서버를 직접 만드는 방법을 알려주세요.
WireGuard VPN 서버 구축:
# 서버 설치sudo apt install wireguard# 키 생성wg genkey | tee server_private | wg pubkey > server_publicwg genkey | tee client_private | wg pubkey > client_public# 서버 설정 /etc/wireguard/wg0.conf[Interface]Address = 10.0.0.1/24ListenPort = 51820PrivateKey = PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEPostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE[Peer]PublicKey = AllowedIPs = 10.0.0.2/32# 시작sudo wg-quick up wg0sudo systemctl enable wg-quick@wg0
OpenVPN보다 빠르고 설정이 간단합니다. 코드도 4,000줄밖에 안 되어 보안 감사가 쉽습니다.
댓글 1
WireGuard VPN 서버 구축:
OpenVPN보다 빠르고 설정이 간단합니다. 코드도 4,000줄밖에 안 되어 보안 감사가 쉽습니다.