firewall-cmd 명령어를 사용해서 방화벽 포트 오픈

현재 방화벽 설정 확인

[root@localhost network-scripts]# firewall-cmd --list-all

public (default, active)

  interfaces: eno16777736

  sources:

  services: dhcpv6-client ssh

  ports:

  masquerade: no

  forward-ports:

  icmp-blocks:

  rich rules:

 

TCP 22 포트 오픈

[root@localhost network-scripts]# firewall-cmd --permanent --add-port=22/tcp

success

 

변경된 방화벽 설정 로드

[root@localhost network-scripts]# firewall-cmd --reload

success

 

변경된 방화벽 설정 확인

[root@localhost network-scripts]# firewall-cmd --list-all

public (default, active)

  interfaces: eno16777736

  sources:

  services: dhcpv6-client ssh

  ports: 22/tcp

  masquerade: no

  forward-ports:

  icmp-blocks:

  rich rules:

+ Recent posts