- Saved searches
- Use saved searches to filter your results more quickly
- PrivateRouter-LLC/openwrt-x86
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- OpenWRT and WLAN-USB-Sticks (Updated with an example)
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
PrivateRouter-LLC/openwrt-x86
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
How to Transform any PC into an OpenWRT VPN Wifi Router and Self Hosted Docker Web Server
Did you know that your old laptop, PC, or Intel NUC can transform into a VPN WiFi router that just happens to be capable of self hosting private websites? In this tutorial we will show you how easy it is to install PrivateRouter OpenWRT, a powerful WiFi router platform that can run WireGuard, OpenVPN, V2ray, SSL proxies, Socks5, and Docker. All you need is a spare USB drive to get started.
Disclaimer: Before we begin make sure there is nothing valuable on the old PC’s hard drive that you will use. Any old data will be written over and gone forever .
Prepare the USB Installer
To make this as painless as possible we created a bootable Linux Mint USB image with everything you will need pre-installed.
You can download from this link our custom Linux Mint image. This image is only 4GB in size so any USB drive will work however if you have a USB 3.0 drive that works best.
Next, download our favorite application to copy bootable images onto USB drives: balenaEtcher. balenaEtcher is compatible with Windows, MacOS, and Linux.
Start balenaEtcher and click the Flash from file button. Locate the custom Linux Mint image that was downloaded over bittorrent and insert your USB drive into the computer. Click the Select Target button, choose the USB drive and then click the Select button. Double check that you selected the USB drive and not your main hard drive , then click the Flash button.
Wait a few minutes and once the flash is complete remove the USB drive and proceed to the next step.
Boot Your Old PC from USB
Make sure the old PC is powered off then insert the recently flashed USB drive into the computer. In order to boot from the USB drive you must first change the boot order in the bios settings. Most computer’s bios settings can be accessed by pressing the ESC key, DEL key, or F12 key right away when the PC is powering on. When in doubt it might take a few tries pressing all of them before you reach the blue bios screen.
Power on your PC and press ESC, F12, DEL (or all of them) until you see the bios screen below. Depending on your hardware the bios screen might look a little different but the settings should be similar.
Use the right arrow key to access the Security tab and make sure Secure Boot is set to Disabled. If it shows as enabled press the down arrow to highlight Secure Boot and set it as Disabled. Press ESC to go back to the main bios screen.
Then select the Boot tab and use the down arrow key to highlight Boot Option #1. This option is likely set to your hard disk. Press ENTER and select the USB drive, then go to Save & Exit and choose Save Changes on Exit.
Your PC should now boot the USB drive first instead of the hard drive and you should see the screen below. Press the ENTER key four times to proceed to the Linux Mint Desktop.
Burn PrivateRouter OpenWRT to your Old PC’s Hard Drive
You should now see the Linux Mint Desktop below. Double click balenaEtcher.
Locate the openwrt image on the desktop then click and drag the file into the balenaEtcher window. Next, click Select Target.
Now we are going to do exactly what the warning says: select the system drive and erase the hard drive by writing over it with the PrivateRouter OpenWRT image. (You may have to click the «hidden» link to see the system drive.) Your system drive is usually labeled /dev/sda
Click the Flash button to copy the image to your hard drive.
You should see one more warning about erasing your computer’s hard drives. Click the Yes, I’m sure link.
Wait a few moments while the image is being flashed onto your hard drive.
Once the flash is complete, close balenaEtcher.
Now that the OpenWRT image is on the hard disk we need to create an ext4 partition with the remaining space for Docker to use. On the desktop double click the Gparted icon. (Docker is the software that can run applications directly on your router.)
Make sure to choose the system drive that we just flashed from the dropdown menu (/dev/sda). Right click the unallocated space area and click NEW.
Click the add button to create a new ext4 partition with the unallocated space on the hard drive.
Click the checkbox in the top menu to apply the settings.
You have now copied the PrivateRouter OpenWRT image to your PC’s hard drive. Shutdown the PC and remove the USB drive before moving on to the next step. When prompted click the to save all changes. Apply button
Boot PrivateRouter OpenWRT
Before booting the first time into OpenWRT it’s important to plug a LAN cable into your PC that is connected to another internet enabled WiFi router or modem. The first time your PC/Wifi Router boots up it will update itself and install various drivers, VPN clients and Docker. It will need internet access to complete this task.
If your PC does not have two LAN ports we suggest plugging in a USB LAN adapter so you can access it directly from another computer after all drivers are installed. This OpenWRT image is pre-built with drivers for the UGREEN USB 3.0 Gigabit Ethernet Adapter, however other USB LAN adapters will also work.
If you do not have any extra LAN port or USB Ethernet adapter, you can still connect after the first boot to enable WiFi or connect to an existing WiFi network.
By default your OpenWRT router will run on IP address: 192.168.70.1
Power on the PC and monitor the progress on screen. After first boot wait about five minutes for the router to complete the update process, then reboot.
To ensure you have internet access type «ping 1.1.1.1» and press enter. You should see a reply, however if you are not connected you can plug in a LAN cable to another PC and access 192.168.70.1 in a web browser. (If you can’t access the IP in a web browser follow the troubleshooting steps at the end of this tutorial.)
Once the first boot is complete and all drivers are installed, connect a LAN cable to another PC or Laptop and access 192.168.70.1 from any web browser. Click the Login button:
Click the System tab to proceed with mounting the ext4 Docker partition.
Click the Mount Points menu on the left panel then click the GENERATE CONFIG and MOUNT ATTACHED DEVICES buttons.
Scroll down to MOUNT POINTS and click the EDIT button for the /dev/sda3 ext4 Filesystem.
Check the Enabled option then click the Mount Point dropdown and manually enter /opt/docker2
On the left menu click the Docker tab then select Configuration. In the Docker Root Dir textbox enter /opt/docker2/
Click the Save & Apply button then reboot your system to complete the setup.
OpenWRT and WLAN-USB-Sticks (Updated with an example)
Recently one of my blog’s visitors (Michael) asked me, if it was possible to extend his router with an additional USB-Wifi device. The short answer is: yes.
I’ll give you an example of a tested configuration below. If you are planning to use different parts, please check the caveats here and be sure to get chipsets, that are known to work.
- TP-Link TL-WR1043NDv2
- CSL 300 Mbit Dual Band WLAN USB Stick from Amazon (they sell it as a raspberry pi extension). Yes, you can regulate power and even replace antennas. It seems to be fully capable of DFS and TPC out of the box.
- an USB stand
Plug the stick in the USB stand and connect the cable to your TL-WR1043NDv2’s USB port. lsusb should show:
Bus 001 Device 002: ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter
If you now look into your LuCI-Webinterface, you won’t see a difference in “Network”, “Wireless”, why? Short answer: your /etc/config/wireless configuration file does not know about your new wifi interface. Do …
cd /etc/config
mv ./wireless ./wireless.bak
wifi detect >> ./wireless
cat wireless.bak >> ./wireless
You’ll create a new wifi interface configuration that way and append the existing configuration to it.
You should now edit /etc/config/wireless and remove duplicate lines/duplicate (dummy) blocks for your existing radio0 (thats d-d for deletion of single lines. Save and exit (ESC:x).
Login to LuCI, go to “Administration”, “Network”, “Wireless” and configure your new radio accordingly.
If you like, you can add “option antenna_gain 5” to your radio1 config in /etc/config/wireless. That way transmit power can never exceed regdomain limits. (E.g. 28db shown by iw list minus antenna gain (dBi) 5 is 23. That’s 200 milliwatt EIRP.
Some Realtek adapters may not be that easy to configure, especially when they need device firmware to be uploaded, but it can probably be done, as long as your Router has enough flash for a bunch of drivers and firmware.
- Do research on whether the dongle is supported by linux in general.
- does it need additional (FullMac) firmware? Yes: could be a problem. No, continue.
- Support for ndiswrapper only … forget about it…
- If the stick’s original antenna is detachable, you therefore must not use it in combination with a replacement antenna of higher gain. (Usually OEM antennas have a relational gain of 2dB to 5 dB).
- Example: “High gain” usb stick has a fixed txpower of 15dB(dBm) and is packaged with a 5dBi omnidirectional antenna. The resulting transmission power will be 20dB (dBm), which is perfectly legal (EIRP must not exceed 20dB in Europe within 2.4 GHz; for 5GHz higher values apply, but these depend on additional factor, which are beyond the scope of this post).
If e.g. you have a router running OpenWRT, and that router is equipped with an USB port, you may connect your dongle to the router.
- Run the command lsusb. It will tell you, the manufacturer and device id in hexadecimal format.
- Use Google or any other websearch for this term. You may narrow the search by adding ‘openwrt’, ‘linux’, ‘linux driver’ and so on.
- The search hopefully will tell you, whether the dongle is supported by your version of OpenWRT and tell you more about the steps to take.