创建frp服务端配置文件
mkdir /etc/frp
touch /etc/frp/frps.ini
vi /etc/frp/frps.ini
[common]
bind_port = 7000
vhost_http_port = 8080
vhost_https_port = 8081
dashboard_addr = 0.0.0.0
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = www19930327
http
使用8080
端口,https
使用8081
端口 dashborard 使用7500
端口
Docker 安装 frps
docker run --restart=always --network host -v /etc/frp/frps.ini:/etc/frp/frps.ini -d --name frps snowdreamtech/frps
--network host
: host 网络模式,所有容器端口都对应属主机端口,不存在映射关系。
当然也可以用命令控制防火墙放行端口。
其中:121.22.133.45 为你的阿里云ECS的公网IP地址
访问:
http://121.22.133.45:8080
http://121.22.133.45:7500
输入账号密码,登录成功后:
frpc.exe -c frpc.ini
感谢帮助!
本文作者: yiyun
本文链接: https://moeci.com/posts/分类-docker/docker-frp/
版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!