CentOS 7.x firewalld 대신에 iptables 로 대체
아무리 봐도 firewalld 는 생소해서 도무지 적응이 안된다.
firewalld 를 내리고 iptables 를 설치해보자.
[root@conoha ~]# systemctl stop firewalld
[root@conoha ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@conoha ~]# yum install iptables-services
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.riken.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package iptables-services.x86_64 0:1.4.21-16.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
iptables-services x86_64 1.4.21-16.el7 base 50 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 50 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
iptables-services-1.4.21-16.el7.x86_64.rpm | 50 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : iptables-services-1.4.21-16.el7.x86_64 1/1
Verifying : iptables-services-1.4.21-16.el7.x86_64 1/1
Installed:
iptables-services.x86_64 0:1.4.21-16.el7
Complete!
[root@conoha ~]# systemctl enable iptables
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
[root@conoha ~]# systemctl start iptables
[root@conoha ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@conoha ~]#
폰트 굵은 부분만 보면 된다.
'LINUX' 카테고리의 다른 글
CentOS 7.x 아파치 2.4.x 다운로드 속도 제한하기 (0) | 2016.04.09 |
---|---|
아파치 웹서버 성능검사 도구 (0) | 2016.04.08 |
CentOS 7.x enp0s3 를 eth0 로 변경하는 방법 (2) | 2016.04.07 |
CentOS 7.x ifconfig command not found 해결 방법 (0) | 2016.04.06 |
CentOS 7.x mysql root 비밀번호 변경 및 초기화 (1) | 2016.04.06 |