How to Expose Local Services to the Internet with Lanproxy – A Secure TCP Tunnel Guide

Lanproxy is an open‑source TCP tunneling tool that lets you proxy local PCs or servers to the public internet, supporting any TCP‑based protocol, and the article explains how to compile, configure server and client, and run the service securely.

21CTO
21CTO
21CTO
How to Expose Local Services to the Internet with Lanproxy – A Secure TCP Tunnel Guide
Lanproxy is a tool that proxies a LAN personal computer or server to the public internet, currently supporting only TCP traffic forwarding and any TCP‑based protocol (websites, local payment interfaces, SSH, remote desktop, etc.). Existing services like NatHole, TeamViewer, GoToMyCloud require third‑party servers and fees, impose restrictions, and pose data‑security risks because traffic passes through third parties.

Related Links

Home: https://lanproxy.thingsglobal.org

Release package: https://github.com/ffay/lanproxy/releases

Implementation Overview

Usage

Compile and Package

Clone the source code and run mvn package. The packaged resources are placed in the distribution directory, including the client and server binaries.

Server Configuration

The server configuration file resides in the conf directory as config.properties.

Access the proxy configuration UI at http://<em>ip</em>:8090 and log in with the username and password defined in the configuration file.

A single server can support multiple client connections; configuration data is stored in ~/.lanproxy/config.json .

Client Configuration

The client configuration file is also placed in the conf directory as config.properties.

Running the Proxy

One internal PC or server (runs proxy-client) and one public server (runs proxy-server).

Install Java 1.8 runtime environment.

On Linux/macOS, execute startup.sh in the bin directory.

On Windows, execute startup.bat in the bin directory.

Other Notes

You can test the setup by accessing http://devbook.thingsglobal.org/, which proxies the local machine via a VPS.

For normal websites, ports 80 and 443 can be used together; you can combine Lanproxy with proxygateway or Nginx to reverse‑proxy different domains to internal ports, then map those ports to the LAN. SSH, remote desktop, and other services can use any unused port.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Javanetwork proxylanproxyTCP tunneling
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.