Transform Your Old Laptop: A Comprehensive Guide to Using It as a Router for Secure Browsing
This guide details how to repurpose an old computer (laptop or mini-PC) as a router, enabling network-wide secure browsing. Unlike flashing to a dedicated router OS like OpenWRT, this method leverages the existing operating system (Windows, Linux, or macOS) of the machine. It allows you to use the device’s IP forwarding capabilities and proxy software to share a secure internet connection with all devices on your home network.
Why Use a Computer as a Router?
Using a computer as a router offers several advantages, including:
- Leveraging existing hardware: Repurpose idle devices, saving on new equipment costs.
- Flexibility: Compatible with various operating systems (Windows, Linux, macOS).
- Network-wide secure browsing: Enables secure browsing for all connected devices.

Windows Configuration
This section outlines the steps to configure a Windows machine as a router.
Prerequisites
- RouteForwarder tool
- v2rayN (version 6.33 is recommended)
Download links for these tools will be provided. Extract the downloaded files.
Configuration Steps
- Open RouteForwarder: Run the RouteForwarder tool. It will automatically detect your physical network interface and default gateway. Verify the information. If there are errors related to IPv6, disable IPv6 in your network adapter settings.
- Set Static IP: Configure a static IP address for the computer within your network’s subnet. This prevents IP address changes upon reboot.
- Enable Routing: In RouteForwarder, enable IP forwarding. This may require a system reboot.
- Configure v2rayN: Run v2rayN as administrator. Import your secure browsing nodes. Copy the address (IP or domain) of your chosen node and paste it into RouteForwarder’s “Extra Routes” section. Add each node on a separate line. Set the routing rule in v2rayN to “Global.”
- Enable TUN Mode: If running v2rayN as administrator, enable TUN mode. This will create a new network interface.
- Verify Connection: Check that the computer can now access the internet securely.

Connecting Devices
To route traffic from other devices through the Windows computer:
- Find your computer’s IP address.
- On the device you want to connect, configure its network settings to use a static IP address within the same subnet as the computer.
- Set the device’s gateway to the computer’s IP address.
- Set the device’s DNS server to a public DNS server (e.g., 1.1.1.1). Avoid using the router’s or computer’s IP address for DNS.
For devices that automatically obtain IP addresses via DHCP, modify the DHCP settings in your router. Set the default gateway to the computer’s IP address and specify a public DNS server.
Linux Configuration
This section details how to configure a Linux machine (with a graphical interface, like Kali) as a router.
Prerequisites
- clash for Windows (Linux version)
Configuration Steps
- Enable IP Forwarding: Open a terminal and run the command `sudo sysctl -w net.ipv4.ip_forward=1`. This enables IP forwarding.
- Install and Configure Clash: Download, extract, and run clash for Windows (Linux version). Import your nodes and test the connection. Install the service mode by clicking “manage” and then “install.” Restart the application.
- Enable TUN Mode: Enable TUN mode in clash. Reset TUN settings to default before enabling.
- Verify Connection: Ensure the Linux machine can access the internet securely.
Connecting Devices
Configure other devices as described in the Windows section, setting the device’s gateway to the Linux computer’s IP address.
macOS Configuration
The process for macOS is similar to Linux.
Prerequisites
- clash for Windows (macOS version)
Configuration Steps
- Enable IP Forwarding: Open a terminal and run the command `sudo sysctl -w net.inet.ip.forwarding=1`.
- Install and Configure Clash: Download, install, and configure clash for Windows (macOS version) as described in the Linux section.
- Enable TUN Mode: Enable TUN mode in clash. Reset TUN settings to default before enabling.
- Verify Connection: Ensure the macOS machine can access the internet securely.
Connecting Devices
Configure other devices as described in the Windows section, setting the device’s gateway to the macOS computer’s IP address.
Command-Line Linux (e.g., Ubuntu Server)
For headless Linux systems like Ubuntu Server, use v2rayA.
Prerequisites
- v2rayA
Configuration Steps
- Install v2rayA: Follow the installation instructions on the v2rayA website.
- Start and Enable v2rayA: Start the v2rayA service and configure it to start on boot.
- Access Web Interface: Access the v2rayA control panel through a web browser using the computer’s IP address and port 2017 (e.g., `http://192.168.1.104:2017`). Set up an account and password.
- Configure Nodes: Add your nodes or import a subscription.
- Enable Transparent Proxy: In settings, enable transparent proxy and IP forwarding.
- Select Node and Start: Select a node and start the service.

Connecting Devices
Configure other devices as described in the Windows section, setting the device’s gateway to the Linux computer’s IP address.
OpenWRT on a Virtual Machine
This section provides instructions on how to install OpenWRT on a virtual machine (e.g., VMware) to act as a router.
Prerequisites
- VMware (or another virtualization platform)
- OpenWRT firmware (VMDK format recommended)
Configuration Steps
- Download OpenWRT Firmware: Download the appropriate OpenWRT firmware for X86/64 architecture in VMDK format.
- Create Virtual Machine: Create a new virtual machine in VMware, selecting “Custom” configuration. Choose “I will install the operating system later.” Select Linux as the guest operating system. Set network connection to “Bridged.” Choose “Use existing virtual disk” and select the downloaded VMDK file.
- Start Virtual Machine: Start the virtual machine. After it boots, press Enter to access the command line.
- Configure Network: The default IP address is 192.168.1.1, which may conflict with your router. Edit the `/etc/config/network` file using `vim` to change the IP address to a non-conflicting address within your network.
- Connect to Web Interface: Access the OpenWRT web interface via a browser using the newly configured IP address.
- Configure as Router: Configure OpenWRT as a router as described in previous tutorials.
