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

[Request] stat_client 能指定开启的端口吗? #346

Open
thatszer opened this issue Dec 9, 2024 · 1 comment
Open

[Request] stat_client 能指定开启的端口吗? #346

thatszer opened this issue Dec 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@thatszer
Copy link

thatszer commented Dec 9, 2024

🥰 需求描述

启动stat_client后, 会在本地开启一个随机端口, 服务端会连接到这个端口.
这与我的iptables的input链的默认丢弃规则冲突了.
又不好指定一个端口开放, 因为重启stat_client后, 端口就变了.
希望stat_client也能指定一个固定的端口, 比如9090, 就像服务端可以指定8080一样.
谢谢.

客户端放开来源8080的规则后, ping测试又会出现错误, 不知道啥原因?
iptables -A INPUT -p tcp --sport 8080 -j ACCEPT
是不是客户端必须放开所有端口才能监控啊?

🧐 解决方案

📝 补充信息

No response

@thatszer thatszer added the enhancement New feature or request label Dec 9, 2024
@thatszer
Copy link
Author

thatszer commented Dec 10, 2024

### 目前解决方案
# 默认策略为丢弃
iptables -P INPUT DROP
# 放开源端口8080
iptables -A INPUT -p tcp --sport 8080 -j ACCEPT
# 放开源端口80, 三网延迟测试
iptables -A INPUT -p tcp --sport 80 -j ACCEPT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant