[Full Step-by-Step Guide] How to share OpenVPN from a TP-Link router to an Ubuntu Server and enable IPTable Forwarding to share a VPN connection with multiple devices without configuring or redirecting an HTTP Proxy (for implementation). - Things you should understand beforehand.

After trying a VPN, my IP address changed. If you're using a foreign VPN, you can choose one from the VPNGate website or search for IPSpeed OpenVPN on Google Search.

How to configure an OpenVPN client on a TP-Link router and the steps to enable IP forwarding on an Ubuntu server after completion.

Note: VPN Client configuration is only functional on devices during setup on a TP-Link router. For sharing on multiple devices, you will need an Ubuntu Server to enable IP forwarding, which requires configuring IPTables.

Things to prepare beforehand:

> TP-Link Router





> Desktop PC




1. To enable the VPN, go to the website to download the VPN configuration file > Upload VPN, navigate to: TP-Link router management website > Advanced Settings > VPN Server & Client > Select OpenVPN and upload the file and test if the VPN is working.

Please note that if your VPN and old IP address will be unavailable this month, you can renew or switch to a new VPN connection to enhance security. Exceeding the limits or committing serious VPN abuse, including unauthorized continuous use of a VPN, may result in fines or imprisonment. Don't worry! You choose NordVPN: Sign up and members are charged for continuous VPN use. No legal or additional issues.







Assuming I use OpenVPN and Google Public DNS (8.8.8.8, 8.8.4.4), websites will be unblocked (tested).

If you are using OpenVPN and Google Public DNS: Streaming will not be interrupted and transmission will not be stopped if using a private device with a home VPN. VPN performance is dependent on remote data transfer speeds and also on your internet service provider's speed package.


2. Router: Select Client to allow VPN access to "PC" since the PC is acting as the server.

First, verify that the MAC address matches and is correct so that the client can redirect VPN traffic to the TP-Link router for proper operation.

Changing the wrong VPN data transmission option may result in incorrect data transmission or errors on the client-connected device. Check carefully before configuring.

3. For PCs, you need to install Ubuntu Server (available on the website) > Prepare a USB flash drive > Install Ubuntu Server > Press the BIOS key to boot from the USB.

4. After installing Ubuntu Server: Update APT Update & APT Upgrade first > After updating, reboot the computer.

Note: Ubuntu Server does not provide a static or fixed IP address; you will need to install cockpit > find the IP address and visit port 9090 to modify the interface.

Alternatively, you can install Ubuntu Desktop. Type [sudo apt install ubuntu-desktop] and reboot your computer after completion.

For Ubuntu Server 25.10 Desktop version, it is not possible to change or modify static IP address settings if the function is not working. Version 24 is recommended, downloadable at ubuntu.com/download.

5. Install IPTables Persistent 

The final step is to enable IP forwarding:

1. Go to: [sudo nano /etc/sysctl.conf] > find [net.ipv4] > forward to uncomment > save [sudo sysctl -p]

2. To enable MASQUERADE and POSTROUTING forwarding permissions, type [sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE].

3. To enable forwarding to the primary interface to allow clients access to the VPN, type [sudo iptables -A FORWARD -i eth0 -j ACCEPT].


4. To save the configuration settings, type [sudo iptables-save].

Test the correct configuration and verify that the VPN on the TP-Link router is working properly.

1. For iPhone/Android and others: Go to Settings > Wi-Fi / Other connections > Select "Connection details" > Edit and change "Static IP address" > Enter the IP address, subnet, Gateway IP to "<Choose your preferred IP address and do whatever you want with it.>" > DNS address, enter 8.8.8.8, 8.8.4.4 > Save and test if correct.





Let's say I'm using 8.8.8.8, 8.8.4.4 Google Public DNS. You can find the configuration guide on this page.

After successfully setting up the VPN to access multiple devices, test the IP address by visiting whatismyipaddress.com. If the VPN has hidden the IP address, the process is complete.

If you're using a VPN that's difficult to hide your IP address, sign up for an even harder-to-hide IP address to prevent bans or copyright restrictions.

What's it like using a VPN?

A VPN allows multiple devices to connect remotely simultaneously without requiring configuration, going into settings, or installing a VPN.

If you use OpenVPN, hiding your IP address isn't difficult. However, it's not as secure as fearing that Netflix might restrict access to copyrighted content. Don't worry though, subscribing to and activating a VPN that hides your IP address is much more difficult.


A VPN helps protect your privacy and reduce online cyber threats by minimizing the number of connections within your home, such as public Wi-Fi, school, and office.

A VPN can help us protect against and avoid interference from others who borrow or request to use our device to access the internet.

A VPN can only be used by one person within your home and on your personal device. If using a family member's mobile phone, a remote VPN will be slower, potentially preventing internet access until the VPN connection is permanently disconnected.

If you have IoT devices in your home, we recommend disconnecting from the VPN as it may slow down your connection.

At home, if you have a Tapo camera and IoT devices, redirect them to your default internet service provider because remote VPN connections are slower.


We strongly recommend resetting all your IoT devices to disconnect the VPN and switch back to your default internet connection from your internet service provider. Your router must have IoT capabilities to enable Wi-Fi and securely switch the option.

Managed IoT devices require a separate Wi-Fi router to be installed in order to be managed and prevent VPN redirection to unwanted IoT devices.

If you have a cloud storage device installed, such as NextCloud, then you will be protected by a VPN. The answer is correct.


Optional: If using Pi-Hole for VPN streaming, you can install and block ads simultaneously, or you can do it as you please. Don't worry, it's awesome!


If you are using an Unbound DNS Server with your VPN, the answer is "correct". You can install Unbound with the command: [sudo apt install unbound] (optional).


To learn more about VPNs, please visit: https://www.security.org/vpn/

Comments

Popular posts from this blog

Block and permanently shut down the Pi-Hole V6 web server interface.