ipv4에 다음 두 가지 규칙을 적용했습니다.
-A INPUT -s 5.70.139.172/32 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j REJECT --reject-with icmp-port-unreachable
위 내용은 ipv4에 적용됩니다.
ip6tables 패키지를 설치하고 이 두 줄(ipv4 주소를 ipv6으로 대체)을 기본 ip6tables 구성 파일에 복사해 보았습니다. 그런데 이러한 변경 사항이 적용되지 않는 것 같나요?
아마도 방화벽이 사용되었기 때문일까요?
systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-06-22 16:05:41 UTC; 1h 47min ago
Docs: man:firewalld(1)
Main PID: 507 (firewalld)
CGroup: /system.slice/firewalld.service
└─507 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
Jun 22 16:49:37 li1663-14.members.linode.com firewalld[507]: ERROR: Failed to load '/etc/sysconfig/network-scripts/ifcfg-eth0': [Errno 13] Permission denied: ...fg-eth0'
Jun 22 16:49:37 li1663-14.members.linode.com firewalld[507]: ERROR: Calling post func <function ifcfg_set_zone_of_interface at 0x7f353247caa0>(('public', 'eth...fg-eth0'
Jun 22 16:49:51 li1663-14.members.linode.com firewalld[507]: ERROR: Failed to load '/etc/sysconfig/network-scripts/ifcfg-eth0': [Errno 13] Permission denied: ...fg-eth0'
Jun 22 16:49:51 li1663-14.members.linode.com firewalld[507]: ERROR: Calling post func <function ifcfg_set_zone_of_interface at 0x7f353247caa0>(('public', 'eth...fg-eth0'
Jun 22 16:52:05 li1663-14.members.linode.com firewalld[507]: ERROR: Failed to load '/etc/sysconfig/network-scripts/ifcfg-eth0': [Errno 13] Permission denied: ...fg-eth0'
Jun 22 16:52:05 li1663-14.members.linode.com firewalld[507]: ERROR: Calling post func <function ifcfg_set_zone_of_interface at 0x7f353247caa0>(('public', 'eth...fg-eth0'
Jun 22 17:46:11 li1663-14.members.linode.com firewalld[507]: ERROR: Failed to load '/etc/sysconfig/network-scripts/ifcfg-eth0': [Errno 13] Permission denied: ...fg-eth0'
Jun 22 17:46:11 li1663-14.members.linode.com firewalld[507]: ERROR: Calling post func <function ifcfg_set_zone_of_interface at 0x7f353247caa0>(('public', 'eth...fg-eth0'
Jun 22 17:51:58 li1663-14.members.linode.com firewalld[507]: ERROR: Failed to load '/etc/sysconfig/network-scripts/ifcfg-eth0': [Errno 13] Permission denied: ...fg-eth0'
Jun 22 17:51:58 li1663-14.members.linode.com firewalld[507]: ERROR: Calling post func <function ifcfg_set_zone_of_interface at 0x7f353247caa0>(('public', 'eth...fg-eth0'
Hint: Some lines were ellipsized, use -l to show in full.
저는 센토스7을 사용하고 있습니다.
답변1
ip6tables 패키지를 설치해야 합니다. iptables는 ipv4 주소에서만 작동합니다. ipv6 규칙을 포함하는 새 구성을 생성해야 합니다.