Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netbird's private deployment cannot be installed on non-standard ports other than 80/443, resulting in limited playability or versatility. #1794

Open
liuyishengaaa opened this issue Apr 4, 2024 · 8 comments

Comments

@liuyishengaaa
Copy link

Netbird's private deployment cannot be installed on non-standard ports other than 80/443, resulting in limited playability or versatility.

@jiangslee
Copy link

老哥,你的netbird还没跑起来吗?

@liuyishengaaa
Copy link
Author

"😔No, it can be installed successfully, but the 'management' container keeps restarting."

@jiangslee
Copy link

jiangslee commented Apr 4, 2024

你的域名解释是IPV6且不通?所以有没有可能需要单独配置IPV6安全组的端口放行?

另外就是不知道docker内能不能支持IPV6~~~~

#1410 (comment)

@daifeilail
Copy link

还是别改这个功能了。80,443 在中国是需要备案的。 用了其它端口可能绕过监管。 到时候中国封了NETBIRD 大家 都没的玩了。

@daifeilail
Copy link

我是拿这东西来管理我们生产上的服务器和边缘终端的。 不想看到这个软件被封。

@vasquezmi
Copy link

A possible solution to this is to create an interactive walk-through that leverages the port variables in the quick install script.
Allow the installer to choose HTTP, HTTPS and TURN ports prior to the installation either through options:

  1. The install sh similar to the domain entry OR
  2. Prompt the user during install

@jiangslee
Copy link

"😔No, it can be installed successfully, but the 'management' container keeps restarting."

今天有个老哥也是在家宽环境出现management无限重启的问题,我跟他远程排查到是同一光猫下的局域网主机不能访问光猫公网IP导致的问题。以下是找到的文章,你参考下。

BF84EE5BE616599399D18B3E8A15EEDA

类似这个:https://www.jianshu.com/p/98ded91dbd7b

另外,有个Q群可以一起交流下关于自建Netbird服务端遇到的问题,群号:677407258

@jiangslee
Copy link

A possible solution to this is to create an interactive walk-through that leverages the port variables in the quick install script. Allow the installer to choose HTTP, HTTPS and TURN ports prior to the installation either through options:

  1. The install sh similar to the domain entry OR
  2. Prompt the user during install

The prompt installation script is here.

1、Check the public domain name is pointing to your VM and security group port should be publicly accessible (检查域名解释及安全组端口)

Here I use 8088 to replace 80 port, 8443 to replace 443 port, UDP is consistent with the original document 3478, 49152-65535
我这里是用8088替代80端口、8443替代443端口,UDP与原文档一致3478, 49152-65535
image

If your server has BT installed, you may also need to open the above port on the BT-Security page (mainly to enable the Linux firewall)
如果你服务器装了宝塔,可能还要在宝塔-安全页面开放上述端口(主要是开启了Linux防火墙)

2、Use acme.sh to apply for an SSL certificate and install it in the /root/docker-netbird/certs directory and save it as netbird.yourdomain.com.key netbird.yourdomain.com.pem

使用acme.sh申请ssl证书并安装到/root/docker-netbird/certs目录,保存为netbird.yourdomain.com.key netbird.yourdomain.com.pem

PS: Use DNS mode to automatically update ssl certificates, otherwise you have to update it manually
PS: 最好使用DNS mode自动更新ssl证书,否则你要自己手动更新

3、Run the quickstart script , follow the prompts to fill in the custom port and install netbird(一键quickstart脚本跑起来,按提示填写自定义端口安装netbird)

The following is the latest script for port change deployment, which is recommended.
以下是改端口部署的最新脚本,建议使用。

~# cd /root/docker-netbird/
~/docker-netbird# tree ./certs
certs
├── netbird.my-domain.com.key
└── netbird.my-domain.com.pem
~/docker-netbird# export NETBIRD_DOMAIN=netbird.yourdomain.com && bash <(curl -sSL https://raw.githubusercontent.com/jiangslee/netbird/main-jsl/infrastructure_files/getting-started-with-zitadel.sh)
The NETBIRD_HTTP_PORT variable cannot be empty.
Enter the http port you want to use for NetBird (e.g. 80): 8088
The NETBIRD_3478_PORT variable cannot be empty.
Enter the TURN_LISTENING_PORT you want to use for NetBird (e.g. 3478): 3478
The NETBIRD_PORT variable cannot be empty.
Enter the https port you want to use for NetBird (e.g. 443): 8443
Rendering initial files...

Initializing Zitadel's CockroachDB


[+] Running 7/7
 ✔ crdb Pulled                                                                                                                                                                                      19.4s 
   ✔ 868d60b3f5d4 Pull complete                                                                                                                                                                      4.3s 
   ✔ d680d21f63a9 Pull complete                                                                                                                                                                      0.8s 
   ✔ e6325911d345 Pull complete                                                                                                                                                                      0.9s 
   ✔ ac854e9a30bb Pull complete                                                                                                                                                                     11.0s 
   ✔ a269fdca3aeb Pull complete                                                                                                                                                                      2.0s 
   ✔ f18f484123b4 Pull complete                                                                                                                                                                      3.5s 
[+] Running 7/7
 ✔ Network docker-netbird_netbird                 Created                                                                                                                                            0.1s 
 ✔ Volume "docker-netbird_netbird_caddy_data"     Created                                                                                                                                            0.0s 
 ✔ Volume "docker-netbird_netbird_management"     Created                                                                                                                                            0.0s 
 ✔ Volume "docker-netbird_netbird_zitadel_certs"  Created                                                                                                                                            0.0s 
 ✔ Volume "docker-netbird_netbird_crdb_data"      Created                                                                                                                                            0.0s 
 ✔ Volume "docker-netbird_netbird_crdb_certs"     Created                                                                                                                                            0.0s 
 ✔ Container docker-netbird-crdb-1                Started 
# 省略很多行...
 ✔ management Pulled                                                                                                                                                                                16.2s 
   ✔ bccd10f490ab Pull complete                                                                                                                                                                      4.9s 
   ✔ 69282076af0b Pull complete                                                                                                                                                                      6.0s 
   ✔ e58f9567d72f Pull complete                                                                                                                                                                      0.9s 
[+] Running 7/7
 ✔ Container docker-netbird-management-1  Started                                                                                                                                                    0.5s 
 ✔ Container docker-netbird-coturn-1      Started                                                                                                                                                    0.5s 
 ✔ Container docker-netbird-signal-1      Started                                                                                                                                                    0.5s 
 ✔ Container docker-netbird-crdb-1        Healthy                                                                                                                                                    0.0s 
 ✔ Container docker-netbird-caddy-1       Running                                                                                                                                                    0.0s 
 ✔ Container docker-netbird-dashboard-1   Started                                                                                                                                                    0.5s 
 ✔ Container docker-netbird-zitadel-1     Running                                                                                                                                                    0.0s 

Done!

You can access the NetBird dashboard at https://netbird.yourdomain.com:8443
Login with the following credentials:
Username: [email protected]
Password: 8bxpzu/++6aL*********NYR9L6aL4DI@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants