Pi-VPN : OpenVPN on Raspberry Pi

วิธี Setup ให้ Raspberry Pi เป็น OpenVPN Server (Pi-VPN) : https://www.sitepoint.com/setting-up-a-home-vpn-using-your-raspberry-pi/
1.Download Script สำหรับ Setup
curl -L https://install.pivpn.io | bash
2.เลือก Network Interface ที่จะใช้
3.ระบบจะต้องใช้ Sataic IP เท่านั้น (จะเป็น Fixed Static หรือ Static DHCP ก็ได้)
4.เลือก User ที่จะเก็บ Config ใช้ pi เลยก็ได้
5.เลือก unattended upgrades เพื่อให้ระบบทันสมัยและปลอดภัยอยู่เสมอ
6.เลือก port ที่จะใช้ ใช้ 1194 หรือจะเปลี่ยนเพื่อความปลอดภัยมากขึ้นอีกนิดก็ได้ (ต้องไปตั้งค่า port ของ client ให้ตรงกันด้วย)
7.ตั้งค่าความยากของการเข้ารหัสเป็น 2048 ตามที่ script แนะนำ (แล้วรอสักพักใหญ่ ๆ)
8.ตั้งค่าของ Public IP (ถ้า IP อาจมีการเปลี่ยนแปลงก็ใช้ DNS Entry แล้วเลือกใช้ของ Google ก็ได้)
9.สร้าง user สำหรับใช้งานด้วยคำสั่ง
pivpn add

หมายเหตุ :
ถ้าใช้ Raspbian Stretch อาจมีปัญหาในการ AUTHEN ต้องเปลี่ยน Key ใหม่ ดังนี้
cd /etc/openvpn/easy-rsa
sudo ./easyrsa set-rsa-pass user
sudo nano pki/private/user.key
แล้ว copy Key รวมทั้ง Header ไปด้วย เอาไปวางแทนที่ ENCRYPTED PRIVATE KEY ในไฟล์ .ovpn

ที่มา : https://www.reddit.com/r/raspberry_pi/comments/6w0dxs/openvpnpivpn_on_raspbian_stretch_error_parsing/



Comments

Popular posts from this blog

Artillery Hornet + OctoPrint + Klipper

ย้ายบ้าน

ใต้ร่มกาสาวพัตร