When I watched youtube, a cool foreigner introduced how to build a VPN server on AWS for free, so that memo setup a FREE VPN server in the cloud (AWS) https://www.youtube.com/watch?v=m-i2JBtG4FE&t=529s
The client to connect to is Arch Linux (Arch Labs)
, the kernel version is 5.4.70-1-lts
, and the window manager is openbox
.
Have an AWS account
The executed region is ap-northeast-1
Select below
OpenVPN Access Server
Linux/Unix, Ubuntu Ubuntu 18 LTS | 64-bit (x86) Amazon Machine Image (AMI) | Updated: 8/3/20
Bring Your Own License (BYOL) up to > 2
Clients
Click Review and Launch
Login as root
ssh root@ec2-********.ap-northeast-1.compute.amazonaws.com
Type yes
and then press Enter repeatedly for subsequent prompts
I will exit the session, so log in again below
ssh openvpnas@ec2-********.ap-northeast-1.compute.amazonaws.com
openvpn user credentials settings
sudo passwd openvpn
exit
Browser access below
https://${Public IP address}:943/admin
openvpn
user, login with set credentials
Click VPN Settings
Set Routing
->Should client Internet traffic be routed through the VPN?
To yes
Click save settings
-> Click Update Running Server
Access below
(Use the credentials of the openvpn
user)
https://${Public IP address}:943/
Click Yourself (user-locked profile)
to download client.ovpn
If you do not have the NetworkManager openvpn plugin installed, do the following:
sudo pacman -S networkmanager-openvpn
In the NetworkManager GUI (nm-applet
), click VPN Connection-> Set VPN->+
, and click Import Saved VPN Settings
.
Select client.ovpn
Enter the openvpn
user credentials in the username and password and click Save
Click the nm-applet
icon again and check VPN connection-> client
Confirm that the lock mark is attached to the nm-applet
icon, and execute the following command
Confirm that the output IP address is the public IP of the OpenVPN server
dig +short myip.opendns.com @resolver1.opendns.com
Thank you for the easy-to-understand video I wonder if foreigners are politically correct Poli-correct word hunting scary It costs money to keep EC2 running, so it's better to attach Elastic IP and start it when needed.
Recommended Posts