RedHat, Ubuntu, OpenSUSE LEAP 15.0 등은 시스템 기본 파이어월 관리자로 firewalld 를 제공한다고 한다.
firewalld
firewalld 는 ….
firewalld는 ufw 처럼 iptables 을 구성할 수 있다.
네트워크를 지역 관리가 가능해서 다른 네트워크, 지역에 따라 다른 규칙으로 구성해서 사용할 수 있다. For example “Home” and “Office” where all communications with local machines are allowed, and “Public Wi-Fi” where no communication with the same subnet would be allowed.
OpenSUSE LEAP 15.0, RedHat, Ubuntu 등은 시스템 기본 파이어월 관리자로 firewalld 를 제공한다고 한다.
1
$ sudo apt install firewalld
Start firewalld
To start firewalld, enter the following command as root:
1
systemctl start firewalld
root 사용자로 시작한다.
1 2
sudo systemctl enable firewalld sudo reboot
For more information about the service status, use the systemctl status sub-command:
1 2 3 4 5 6
sudo systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: disabled) Active: active (running) since Thu 1970-01-01 09:01:48 KST; 48 years 6 months ago
sudo firewall-cmd --state
Stop firewalld
To stop firewalld, enter the following command as root:
1
systemctl stop firewalld
To prevent firewalld from starting automatically at system start, enter the following command as root:
1
systemctl disable firewalld
To make sure firewalld is not started by accessing the firewalld D-Bus interface and also if other services require firewalld, enter the following command as root:
1
systemctl mask firewalld
사용해 보기
firewalld 는 명령라인 firewall-cmd 와 GUI로 firewall-config 명령을 지원한다.
Zone 설정
Get a list of all supported zones
1
firewall-cmd --get-zones
List all zones with the enabled features.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
$ firewall-cmd --list-all-zones ...
public target: default icmp-block-inversion: no interfaces: sources: services: ssh dhcpv6-client http https ports: protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
기본으로 제공하는 Zone
drop: Any incoming network packets are dropped, there is no reply. Only outgoing network connections are possible.
block: Any incoming network connections are rejected with an icmp-host-prohibited message for IPv4 and icmp6-adm-prohibited for IPv6. Only network connections initiated within this system are possible.
public: For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.
external: For use on external networks with masquerading enabled especially for routers. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.
dmz: For computers in your demilitarized zone that are publicly-accessible with limited access to your internal network. Only selected incoming connections are accepted.
work For use in work areas. You mostly trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.
home For use in home areas. You mostly trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.
internal For use on internal networks. You mostly trust the other computers on the networks to not harm your computer. Only selected incoming connections are accepted.
결과에서 repo-update 가 Enabled 컴럼이 Yes 인지 확인한다. 만약 No 라면 다음 명령으로 활성화 한다.
1
zypper modifyrepo --enable repo-update
Update repository
zypper ref
Distribution Upgrade
1 2 3 4 5 6 7 8
# zypper dup ...
613 packages to upgrade, 170 to downgrade, 340 new, 103 to remove, 6 to change arch. Overall download size: 658.0 MiB. Already cached: 0 B. After the operation, additional 774.1 MiB will be used. Continue? [y/n/...? shows all options] (y): y
homepi64:~ # reboot [11840.081284] reboot: Restarting system MMC: mmc@7e202000: 0, mmc@7e300000: 1 Loading Environment from FAT… *** Warning - bad CRC, using default environment
진행중 42.2와 충돌하는 패키지가 표시되는데 모둔 1로 설치했다.
1 2 3 4 5 6 7 8 9 10 11 12
4 Problems: Problem: nothing provides tar = 1.30 needed by tar-lang-1.30-lp150.2.3.2.noarch Problem: nothing provides python3-dbus-python needed by snapper-zypp-plugin-0.5.4-lp150.3.3.1.noarch Problem: nothing provides libgphoto2-6 = 2.5.18 needed by libgphoto2-6-lang-2.5.18-lp150.2.3.1.noarch Problem: nothing provides gpg2 = 2.2.5 needed by gpg2-lang-2.2.5-lp150.3.3.1.noarch
Problem: nothing provides tar = 1.30 needed by tar-lang-1.30-lp150.2.3.2.noarch Solution 1: deinstallation of tar-lang-1.27.1-11.1.noarch Solution 2: keep obsolete tar-lang-1.27.1-11.1.noarch Solution 3: break tar-lang-1.30-lp150.2.3.2.noarch by ignoring some of its dependencies
Choose from above solutions by number or skip, retry or cancel [1/2/3/s/r/c] (c):1
재시동
업그레이드를 설치한 후에 재시동 하면 약 5분 정도 펌웨어 등을 설치하는 과정을 거친다. 로그인해서 버전을 확인해 보자
qkboo@homepi64:~> uname -a Linux homepi64 4.4.104-18.44-default #1 SMP Thu Jan 4 08:07:55 UTC 2018 (05a9de6) aarch64 aarch64 aarch64 GNU/Linux
~> uname -a Linux homepi64 4.4.104-18.44-default #1 SMP Thu Jan 4 08:07:55 UTC 2018 (05a9de6) aarch64 aarch64 aarch64 GNU/Linux