In this tutorial, we will show you how to forward a port to an Ubuntu server, basically making an ngrok-type server, with no bandwidth limit.
1. Get a server
First, you have to get a server with a public IP address. I use Linode, but you can use anything that uses an ssh command to log in as root. Make the server run Ubuntu (the OS).
Copy the IP address for later.
2. Set up the server
To set up the server, ssh into the server and enter the following commands or download the shell file and run it:
# Log in as root
sudo -s
# Update the system using apt
apt update && apt upgrade -y
# Install socat
apt install socat
3. Forward the Windows port
In this tutorial, we are using the port 443. However, you can customize this to your needs.
From your Windows PC, run the following command as admin, but replace <user> and <ip> to the configuration of your Ubuntu server:
ssh -R 8443:localhost:443 <user>:<ip>
This will forward the port 443 to the server’s port 8443.
4. Make it be able to access on Chrome
To access it on Chrome or whatever browser you are using, you have to run this one final command:
socat TCP4-LISTEN:443,fork TCP4:localhost:8443
Conclusion
In this tutorial, we learned how to set up a port-forwarding solution using an Ubuntu server.
Leave a Reply