iptables 을 이용해서, L4에 접근하지 않고 서비스를 재배포하며 운영할 수 있는 구조로 운영하고 있었습니다.

이번에 CentOS 6.9 -> 7.0 으로 변경되면서,

firewall 로 바뀌는 것으로 알고 있어, 기능 적용하려고 하는데,

[XXX-01:root]/home/ssp/log/log4j/script>#firewall-cmd --state
not running

firewall 이 꺼져있는것을 확인했습니다. 시스템팀에게 확인 결과, 파이어월을 키면 완전 차단(?) 되어서,
기능을 꺼두었다고 합니다.

실제 IPS 와 웹방화벽 등이 그 역활을 하고 있어,
실질적으로 서버내의 firewall은 큰 의미가 없다고 하여,

적용하려는 이유를 설명하여, 요청했습니다.

L4 차단 : 
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address=L4_IP reject' 
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address=L4_IP drop' 

L4 다시 허용 : 
sudo firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address=L4_IP reject '
sudo firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address=L4_IP drop' 

위와 같은 용도를 사용하고 싶다고 하니,
서비스팀에서, 그럼 iptables 로 변경해주겠다고 하여, 어제 작업이 완료되었습니다.

아무리 테스트를 해도 안되어,

[XXX-02:root]/root/shell>#service iptables status
Redirecting to /bin/systemctl status iptables.service
● iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

….. service iptables status를 하니, inactive (dead) 였네요.

혹시 모르니, 시스템팀에게, 해당 기능을 off 된 이유를 문의한 후 on 처리 했습니다!

[XXX-02:root]/home/ssp/log/access>#service iptables status
Redirecting to /bin/systemctl status iptables.service
● iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
   Active: active (exited) since 수 2020-11-25 11:16:37 KST; 1h 9min ago
  Process: 25898 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
 Main PID: 25898 (code=exited, status=0/SUCCESS)

11월 25 11:16:37 XXX-02 systemd[1]: Starting IPv4 firewall with iptables...
11월 25 11:16:37 XXX-02 iptables.init[25898]: iptables: Applying firewall ...]
11월 25 11:16:37 XXX-02 systemd[1]: Started IPv4 firewall with iptables.
Hint: Some lines were ellipsized, use -l to show in full.