본문 바로가기
DBMS/기타

[linux] 방화벽 비활성화

by 드바 2024. 1. 19.

OS: linux 8.7

 

방화벽 상태 확인

systemctl status firewalld.service

[root@svr1 ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2024-01-19 13:18:36 KST; 1s ago
     Docs: man:firewalld(1)
 Main PID: 5175 (firewalld)
    Tasks: 2 (limit: 5725)
   Memory: 27.6M
   CGroup: /system.slice/firewalld.service
           └─5175 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork --nopid

 

방화벽 stop

systemctl stop firewalld.service

반대는 systemctl start firewalld.service

[root@svr1 ~]# systemctl stop firewalld.service
[root@svr1 ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Fri 2024-01-19 13:21:59 KST; 3s ago
     Docs: man:firewalld(1)
  Process: 5175 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 5175 (code=exited, status=0/SUCCESS)

 

방화벽 비활성

재기동 시 start 되지 않도록 비활성화 해줍니다

systemctl disable firewalld.service

반대는 systemctl enable firewalld.service

[root@svr1 ~]# systemctl disable firewalld.service
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@svr1 ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead) since Fri 2024-01-19 13:33:30 KST; 10s ago
     Docs: man:firewalld(1)
 Main PID: 1967 (code=exited, status=0/SUCCESS)
 

댓글