Bypass TeamViewer Commercial Detection with FRP: A Step‑by‑Step LAN Tunnel Guide
This tutorial explains how to use FRP to create a local‑LAN tunnel for TeamViewer, avoiding commercial detection by forwarding port 5938 through a self‑hosted server, and provides detailed server and client configurations, command examples, and the underlying networking principle.
Background
TeamViewer is a remote‑desktop application that uses TCP port 5938. Commercial detection systems may block its traffic, especially when used through third‑party resellers.
Solution Overview
Deploy frp (fast reverse proxy) on a public server to create a LAN‑style tunnel for TeamViewer. The tunnel forwards port 5938 from the controlled machine to the server, making the connection appear as a local LAN link and bypassing detection.
Server‑Side Configuration
Create frps.ini (or equivalent) with a custom token and open the listening port (default 7000). Example:
[common]
server_addr = SERVER_IP
server_port = 7000
token = 12310086
[teamview]
type = tcp
local_ip = 127.0.0.1
local_port = 5938
remote_port = 5938Replace SERVER_IP with the server’s public IP. Use a strong 12‑character alphanumeric token. Ensure the firewall allows inbound traffic on server_port (7000) and on port 5938.
Controlled‑Machine (Client) Setup
On the machine to be controlled:
Enable TeamViewer’s “LAN acceptance” mode.
Set an unattended password.
Install frpc.exe (or the appropriate client binary).
Create frpc.ini matching the server configuration, e.g.:
[common]
server_addr = SERVER_IP
server_port = 7000
token = 12310086
[teamview]
type = tcp
local_ip = 127.0.0.1
local_port = 5938
remote_port = 5938Start the client with:
frpc.exe -c frpc.iniControlling Machine Operation
Launch TeamViewer, enter the server’s public IP in the “Control remote computer” field, and connect. TeamViewer automatically targets port 5938; frp on the server forwards this request to the controlled machine’s port 5938, establishing the session.
Underlying Principle
TeamViewer can operate over a LAN by connecting directly to an IP address on port 5938. By using frp, the remote host is presented as part of the same LAN, so the traffic is treated as a LAN connection and bypasses commercial detection that monitors typical internet‑based TeamViewer traffic.
Notes & Caveats
TeamViewer does not support custom ports; both ends must use port 5938.
Firewalls on server and client must allow inbound/outbound traffic on port 5938 and on the frp listening port (default 7000).
Keep the token secret to prevent unauthorized access.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
