OpenWRT : Create VPN server with WireGuard

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello welcome to my channel In this video, I show you step-by-step instructions on how to create a private VPN server on an OpenWRT router using WireGuard In this video, I show you step-by-step instructions on how to create a private VPN server on an OpenWRT router using WireGuard This is my router and it has been upgraded to OpenWRT Firmware I will turn it into a VPN server by installing WireGuard Client devices access private resources through a VPN connection Here are the steps By default, OpenWRT does not have the WireGuard package installed, so you search and install it These are the necessary packages to install WireGuard After completing the installation, restart the router to apply WireGuard settings The next step is to create a new WireGuard interface to connect the router with client devices You access the OpenWRT router using the command line interface You use an ssh connection to remotely access the OpenWRT router I use software called PuTTY to access the router over the network Then go to the WireGuard homepage and refer to the installation instructions above On the OpenWRT router, navigate to the folder named etc Then create a new folder named WireGuard Here you generate private and public keys for the WireGuard server The keys have been successfully generated, you use the command called cat to display the private and public keys I will write these keys down for use in the next step You go to the OpenWRT router's graphical interface Now you create a new WireGuard interface to connect to client devices You are asked to enter your private key and public key You use the private key and public key just generated in the previous step to create a new WireGuard interface I just copied and pasted the public and private keys as above You set the port to 51820 for this interface Next you assign the ip address to the WireGuard interface Here I assign it the ip address 10.14.0.1 Then you go to Firewall Settings and assign this interface to the area named LAN At this step, you have completed creating a new WireGuard interface on the OpenWRT router The next step is to create a new WireGuard interface to connect the router with client devices You go to firewall settings on OpenWRT Here you create a new port forwarding You name this port forwarding setup, I named it WireGuard WireGuard uses the UDP protocol You forward from the area named WAN to the area named LAN The ip address forwarded to is the router's ip address In this case that ip address is 192.168.1.1 You change the ip address if your router ip address is different from mine It's time to configure the client device In the following steps I show you how to create a configuration file for the client device On your Windows computer you install client software called WireGuard Here you create a new configuration file for the client I named it client 1 On the OpenWRT router, I created a new peer on the newly created WireGuard interface You name it and follow these steps You copy the public key and private key from the WireGuard software on a Windows computer Next you assign an ip address to this client device Here I assign it the ip address 10.14.0.3 Don't forget to enable Route Allowed IPs Then you save the changes and restart the router This is the status after setup is completed Now you complete the configuration for the client device named client 1 You assign an ip address to the client device just like the settings on the router In this case client 1 is assigned the ip address 10.14.0.3 The DNS address is 1.1.1.1 You then set up the WireGuard server's public key You copy the public key and private key from the WireGuard software on a Windows computer You connect the client to the VPN server using the public ip address on the OpenWRT router This is my public ip address As you know, in the previous step I used port 51820 for the WireGuard VPN connection As you know, in the previous step I used port 51820 for the WireGuard VPN connection You can establish a VPN connection within your local network to test the newly created client configuration. As you can see there is traffic on the VPN interface, so I have successfully set it up But most of us use dynamic public ip addresses, so I show you how to update ip addresses using dynamic domain names. But most of us use dynamic public ip addresses, so I show you how to update ip addresses using dynamic domain names. One of my favorite dynamic domain name updating services is called DuckDNS #N/A You install the above packages for your router You install a package called DDNS for the OpenWRT router Next you create a DuckDNS account and create a new free domain name This is my domain name Follow the instructions on the DuckDNS homepage to install on your router You access the OpenWRT router using SSH Then you open the file named ddns You delete all the above lines by pressing the Esc key Then press :%d and finally press Enter Next, just copy the lines as instructed You edit the first line if it's wrong like me To save the file, press Esc, then press :wq and finally press Enter After completing the installation, restart the router to apply WireGuard settings You will see on the graphical interface that the domain name and ip address have been mapped successfully I open the configuration for the client device and replace the ip address with the dynamic domain name Now you no longer have to worry about the public ip address being changed anymore Because the DuckDNS service has helped you solve that problem Next I export the configuration file for the client device named client 1 This configuration file will be sent to the client device It is separated from the OpenWRT router by the internet So if I want to connect to local resources I use a VPN connection On my laptop I installed WireGuard software And finally you establish a VPN connection using WireGuard My laptop is connected to the local network via the internet Above are the steps to set up a VPN server on OpenWRT using WireGuard Thank you for watching, don't forget to like and subscribe to the channel Good luck
Info
Channel: NETVN82
Views: 24,835
Rating: undefined out of 5
Keywords: netvn, net vn, WireGuard on OpenWRT, OpenWRT VPN server, wireguard, how to setup wireguard server on openwrt, openwrt wireguard server, wireguard vpn server, openwrt wireguard client to site, how to install wireguard server on openwrt, vpn server with wireguard, how to setup wireguard vpn on router, how to create your own vpn server on old router, how to create vpn server on openwrt, remote access your network with wireguard, wire guard, open wrt, router, open wrt wire guard setup
Id: 6NIJcsJsRaM
Channel Id: undefined
Length: 14min 3sec (843 seconds)
Published: Wed Sep 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.