더북(TheBook)

3. 설치가 완료되면 시스템이 재부팅되어도 자동으로 실행할 수 있도록 systemctl enable 명령어를 이용해 활성화합니다.

[root@controller ~]# systemctl enable iptables
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.


4. 서비스가 시작되면 정상적으로 실행되는지 status를 확인합니다.

[root@controller ~]# systemctl start iptables
[root@controller ~]# systemctl status iptables
 iptables.service - IPv4 firewall with iptables
    Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor 
preset: disabled)
    Active: active (exited) since 금 2016-07-22 23:45:20 KST; 6s ago
   Process: 5058 ExecStart=/usr/libexec/iptables/iptables.init start 
(code=exited, status=0/SUCCESS)
  Main PID: 5058 (code=exited, status=0/SUCCESS)

 7월 22 23:45:20 controller systemd[1]: Starting IPv4 firewall with 
iptables...
 7월 22 23:45:20 controller iptables.init[5058]: iptables: Applying firewall 
rules: [  OK  ]
 7월 22 23:45:20 controller systemd[1]: Started IPv4 firewall with iptables.
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.