大网数据广告活动
服务器运维问答

Standard ports for web server

· 52CE 我爱测

I'm using Hetzner for a server which only needs 80/443 and 22 accessible to the outside world. When I use the Hetzner firewall template, it also adds: protocol icmp, which I think is for ping ports 32768-65535 are open with a tcp…

问题原文

原帖链接 · port5432 · CC BY-SA 4.0

I'm using Hetzner for a server which only needs 80/443 and 22 accessible to the outside world. When I use the Hetzner firewall template, it also adds:

  • protocol icmp, which I think is for ping
  • ports 32768-65535 are open with a tcp flag of 'ack'

AWS seems to close down everything, including ping.

  • Is there any reason to have ports 32768-65535 open and what does 'ack' mean ?
  • Should protocol icmp be disallowed?

The Nginx server is running https and 80 is redirected to 443. Is it best practice to leave 80 open and redirecting to 443, in case traffic comes in on 80, or should 80 also be closed?

已采纳解答

原帖链接 · Henrik Pingel · CC BY-SA 4.0

Port 80: Port 80 needs to be open so that the Nginx can redirect to port 443. If you block port 80 clients trying to connect via http will time out.

There is a website dedicated to argue that ICMP should not be blocked.

ACK is the last step in the three-way handshake TCP uses to establish a connection. The port range 32768-65535 is for ephemeral ports. So that firewall rule should not be touched.

These rules look different from AWS security group rules because AWS security group rule are set for inbound or outbound traffic.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-04-10)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。