fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
80.97k stars 12.78k forks source link

Server can bind to 80 but client failed to connect with it #4215

Open SoftCoderCritic opened 2 weeks ago

SoftCoderCritic commented 2 weeks ago

Bug Description

here is the simple config for testing

server:

bindPort = 80

client:

serverAddr = server ip
serverPort = 80

[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 12552

I can successfully use port 1080, and any port greater than 1024 without any issues, but I'm unable to use common ports like 80 and 443. The firewall accepts all incoming ports, and when I start the server with sudo, it successfully binds to port 80. However, when I start the client, it continuously tries to connect to the server. If I switch to a different port, the connection is established immediately.

Here are the relevant logs:

[sub/root.go:142] Starting frpc service with the configuration file [./frpc.toml]. [client/service.go:294] Attempting to connect to server... Could there be any configuration I might have missed? I'm open to testing any suggestions. Any help would be greatly appreciated.

frpc Version

latest

frps Version

latest

System Architecture

linux/amd64, mac/arm64

Configurations

server:

bindPort = 80

client:

serverAddr = server ip
serverPort = 80

[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 12552

Logs

No response

Steps to reproduce

  1. ...

Affected area

xqzr commented 2 weeks ago

ISP 可能会阻止 80 端口传入