Is it safe for LanShare to open port 8000? Four layers of protection

For phones to connect, LanShare opens port 8000 on your computer. The first question many people ask is: “Is opening a port going to get me hacked?”

In short: people on the internet can’t reach it, so the risk is low. The people to think about are the ones on the same Wi-Fi. This page explains LanShare’s layers of protection, what you should watch out for yourself, and the settings we recommend.

1. What is port 8000?

Every program on a computer that accepts connections waits at a numbered “door”, called a port. Web servers usually use 80 and 443; LanShare uses 8000. When your phone opens http://your-computer’s-IP:8000, it is knocking on door 8000, and LanShare answers.

“Opening a port” means letting Windows Firewall allow other devices to knock on that door. Who can reach the door, and whether they get in once they knock, is what the layers below take care of.

2. LanShare’s four layers of protection

LayerWhat it doesWho it keeps out
① RouterHome and office routers don’t let outside connections in by default (unless you set up “port forwarding”)Strangers on the internet
② Windows FirewallThe firewall rule LanShare creates applies only to Private and Domain networks. On a “Public” network such as a café or airport, port 8000 is not openedOther people on public Wi-Fi
③ Local IPs onlyLanShare checks the address of every connection and refuses anything that isn’t a local-network IP (the “local network connections only” you see on screen)Outside connections, even if the first two layers fail
④ Connection code + lockoutPhones must enter the connection code shown on the computer. 5 wrong tries locks that device out for 10 minutesPeople on the same Wi-Fi who don’t know the code

LanShare Connect tab: server accepts local network connections only, all connection checks passed

Connect tab: Server running (local network connections only), all connection checks passed

LanShare also keeps file transfers and printing inside your home or office network: files are never uploaded to any cloud or server. Close the program and nothing is listening on port 8000 — the door is shut.

3. What you should actually watch out for

1) Anyone on the same Wi-Fi can see the sign-in page

Visitors, coworkers, or a neighbour who learned your Wi-Fi password can open LanShare’s sign-in page once they are on the same Wi-Fi. The only thing stopping them is the connection code.

🔑 The single most important step: don’t keep the default code 1234.
In LanShare’s Settings tab, change the connection code to 6–8 digits that nobody can guess (not a birthday, phone number, 1111 or 123456). The code can be 4–12 digits.

2) Share only the folders you need

3) Transfers use http, without extra encryption

LanShare uses plain http, not https. On home Wi-Fi the Wi-Fi itself (WPA2/WPA3) already encrypts the radio signal, so it’s fine for homes and small shops. If you’re moving confidential documents (contracts, payroll, customer data) over a busy shared office network, follow your company’s rules for sending files.

4) Don’t set up “port forwarding 8000” or DMZ on your router

Some guides tell you to add “Port Forwarding”, a “Virtual Server” or “DMZ” on your router so outside devices can connect. LanShare doesn’t need this, and we don’t recommend it. If you set up port 8000 forwarding or put your computer in DMZ for another program, turn it off in your router settings. You can also switch off UPnP on the router so programs can’t open ports by themselves.

5) Close LanShare when you’re not using it

When LanShare isn’t running, nothing is waiting on port 8000 and no one can connect. If you won’t use it for a while (say, you’re travelling), simply close the program.

4. What does “One-click fix” change?

LanShare connection check: Public network and firewall warnings with One-click fix

The connection check finds a Public network and port 8000 blocked by the firewall; click “One-click fix”

The first time you use LanShare, the connection check often shows two warnings. Clicking “One-click fix” brings up a Windows administrator prompt. If you agree, it does only two things:

⚠️ On café, hotel or airport Wi-Fi, don’t click “One-click fix” to make it a Private network. Leave public Wi-Fi as “Public” so port 8000 stays closed, and use LanShare back on your own home or office network.

5. Security checklist

ItemRecommendation
Connection codeChange it from 1234 to 6–8 digits nobody can guess
Connection code valid for (days)Keep it short (for example 7–30 days)
Shared foldersShare a dedicated folder only; Read only where uploads aren’t needed
VisitorsPut them on the guest network, not your main network
RouterWPA2/WPA3 with a long password; no port 8000 forwarding or DMZ
Public Wi-FiLeave it as “Public”; don’t click One-click fix
When not in useClose LanShare

6. Questions

Q: My antivirus says a program wants to open a port. Should I allow it?

If it’s LanShare that you installed and just opened, yes — otherwise phones can’t connect. If you don’t recognise the program asking to open a port, block it first and look it up.

Q: Can people on the same Wi-Fi see every file on my computer?

No. Phones only see the folders you added in LanShare’s “Shared folders” tab; nothing else is visible — and they need the connection code first.

Q: Can I use a different port?

Yes. Change “Port (applies after restart)” in the Settings tab, restart LanShare, then click “One-click fix” in the connection check so the firewall opens the new port. Changing the port only changes the door number, though — it doesn’t make LanShare safer. What really helps are the connection code, Private network and shared-folder settings above.

Q: How can I see which devices have used LanShare?

Open LanShare’s “Transfers” tab. It lists every download, upload and print job with the time, device and file name. If you see something you don’t recognise, change the connection code right away, then click “Sign out all phones” in the Settings tab so every phone has to enter the new code.

More: LanShare settings guide | LanShare user guide