CentOS 7.9にTCPの443ポートを開放する

2021年11月18日

1.OSバージョンを確認
# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

2.現在の設定を確認

# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources:
  services: dhcpv6-client http ntp ssh
  ports: 8080/tcp 21/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

3.即時反映

# firewall-cmd --zone=public --add-port=443/tcp
success

4.恒久的な設定を反映

# firewall-cmd --zone=public --add-port=443/tcp --permanent
success

5.リロード

# firewall-cmd --reload
success

6.設定を再度確認

# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources:
  services: dhcpv6-client http https ntp ssh
  ports: 8080/tcp 21/tcp 443/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

 

CentOS 7

Posted by arkgame