Both sides previous revisionPrevious revisionNext revision | Previous revision |
computing:vpnserver-openwrt [2024/02/17 19:26] – oemb1905 | computing:vpnserver-openwrt [2024/07/01 23:09] (current) – oemb1905 |
---|
------------------------------------------- | ------------------------------------------- |
| |
This tutorial is for flashing a Netgear WNDR3800 router with openwrt and then building a vpn server on it with openvpn. The instructions here can easily be adapted to other hardware. First, download the stable release: | This tutorial was originally designed for using openvpn with openWRT on a Netgear WNDR3800 router. My current hardware, however, is the c7 Archer v5 by TP-Link. Regardless of what you use, however, this tutorial will help you use your openWRT router as a self-hosted VPN solution. First, download the stable release for you model. It's best to find the dedicated hardware page and check your exact variant, etc. Below, I have an example of the page for the Archer. I also included the link to all openWRT downloads and the supported hardware list. |
| |
| * [[https://openwrt.org/toh/tp-link/archer_c7|c7Archerv5]] |
| * [[https://downloads.openwrt.org/|Downloads]] |
| * [[https://openwrt.org/toh/start|Table of Hardware]] |
| |
[[http://downloads.openwrt.org|OpenWrt]] | |
| |
It is probably best to stop network manager; after that, assign a local ip address (on the same subnet as the router) to your network interface. | It is probably best to stop network manager; after that, assign a local ip address (on the same subnet as the router) to your network interface. |
easyrsa --batch init-pki | easyrsa --batch init-pki |
easyrsa --batch gen-dh | easyrsa --batch gen-dh |
easyrsa --batch build-ca nopass | easyrsa --batch build-ca <ca-name> nopass |
easyrsa --batch build-server-full <server> nopass | easyrsa --batch build-server-full <server> nopass |
| |
Since you did not suppress standard output, you should get the following the message, "Initialization Sequence Completed," to indicate a successful connection. Your vpn-server is now complete, and you can repeat the steps for building client keys stated above for other workstations/users. Also, if you need to automate the setup, you can use something like these scripts, which I tweaked a lot, from OpenWrt's wiki: | Since you did not suppress standard output, you should get the following the message, "Initialization Sequence Completed," to indicate a successful connection. Your vpn-server is now complete, and you can repeat the steps for building client keys stated above for other workstations/users. Also, if you need to automate the setup, you can use something like these scripts, which I tweaked a lot, from OpenWrt's wiki: |
| |
* [[https://repo.haacksnetworking.com/oemb1905/haackingclub/-/blob/master/vpnstuff/vpn-server-script.sh|vpn-server-scripts.sh]] | * [[https://repo.haacksnetworking.org/haacknet/haackingclub/-/tree/main/scripts/openvpn/openvpn-openwrt?ref_type=heads|openWRT VPN client-server scripts]] |
* [[https://repo.haacksnetworking.com/oemb1905/haackingclub/-/blob/master/vpnstuff/vpn-client-script.sh|vp-client-scripts.sh]] | |
| |
-- -- -- -- -- | -- -- -- -- -- |