[출처]
https://xshine.tistory.com/304
[CentOS7] 방화벽에 포트 및 서비스 추가, 삭제
CentOS 7 부터는 iptables 대신 firewalld를 기본으로 사용하는듯 하다. 방화벽에 포트 및 서비스 추가 # 서비스 추가 # 서비스 명에는 http, https, ssh 와 같은 서비스를 넣어주면 된다. # $ firewall-cmd --permanen
xshine.tistory.com
1. Listen 포트 확인
netstat을 쓰려면 패키지 설치가 필요하다.
#yum install net-tools
netstat -tlpn | grep listen
리스닝 중인 포트 확인.
2. 방화벽 열어주기
firewall에 대해 정리..
netstat -tlpn | grep LISTEN
firewall-cmd --permanent --zone=public --add-port=8629/tcp
firewall-cmd --permanent --zone=public --remove-port=8629/tcp
firewall-cmd --reload
firewall-cmd --list-all
firewall-cmd --restart
firewall-cmd --stop
firewall-cmd --start
cf) 시스템 데몬
systemctl restart firewalld
systemctl stop firewalld
systemctl disable firewalld
systemctl start firewalld
systemctl enable firewalld
'Infrastructure > Linux' 카테고리의 다른 글
[Linux] vi editor 자주 쓰는 명령어 (0) | 2023.06.13 |
---|---|
[Linux] 리눅스 비밀번호 복잡도 해제 (0) | 2023.05.11 |
[Linux] VirtualBox 리눅스(CentOS 7) 용량 늘리기 (0) | 2023.05.03 |
[Linux] linux bash 연산 (0) | 2023.05.02 |
[Linux] Can't extend the allocator space. name: (SHP parent allocator) MISC (0) | 2023.05.02 |
댓글