Closed chendeshen closed 5 years ago
看自己外网ip用 curl ip.cn
就行了,腾讯云、阿里云的弹性ip实例都这样,ifconfig看不到公网ip的,不会影响frp的使用,我的腾讯云frps已经正常运行半年了
@cloverzrg 我知道公网IP,但是frp就是不成功。可否分享frps.ini文件? 或者[common]部分的bind_addr是写0.0.0.0还是内网IP还是公网IP还是不写? 先感谢~
跟服务器是哪里的无关。
@chendeshen
[common]
bind_port = 7721
token = 123456
vhost_http_port = 8080
[common]
dashboard_port = 7521
dashboard_user = admin
dashboard_pwd = xxxxxx
我昨天也折腾了几个小时,几乎放弃了,后来才发现,原来是安全组的问题,安全组设置全部放行即可。
Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)
Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST
What version of frp are you using (./frpc -v or ./frps -v)? 0.21.0
What operating system and processor architecture are you using (
go env
)? both server (frps) and client (frpc) are CentOS 7.5.1804, x64Configures you used:
frps.ini
[common] bind_addr = 0.0.0.0 bind_port = 7000
frpc.ini
[common] server_addr = [此处为我的腾讯云公网IP] server_port = 7000
[ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000
Steps to reproduce the issue:
Describe the results you received: 本来期望成功利用frp达到内网ssh转发。
Describe the results you expected: 相同设置下Vultr服务器成功。
Additional information you deem important (e.g. issue happens only occasionally): 腾讯云的CentOS输入ip addr是无法看到外网IP(外网网卡),因为有一层NAT。
Can you point out what caused this issue (optional) 腾讯云服务器外网IP与内网IP之间是通过一对一的NAT实现的,内网Ip配置在网卡上,外网Ip配置在网关上。如有需要绑定IP的场景,直接绑定内网IP即可,可以转发到外网IP上。 关于外网ip配置的问题,腾讯云的外网ip没有直接配置服务器上,就像是您看到的,服务器只有一张网卡,且绑定的是内网ip。 服务器的外网ip是绑定在外层TGW网关,内网ip和外网ip之间可以理解为一对一的NAT映射,不会对您的服务产生任何影响。 参考链接: http://bbs.qcloud.com/thread-2133-1-1.html http://bbs.qcloud.com/thread-3412-1-1.html