SSH 서버를 실행하는 kali VM이 있고 SSH를 통해 이 컴퓨터(내 컴퓨터 제외)에 대한 모든 트래픽을 차단하려고 하며 이를 위해 이 iptables 규칙이 있습니다.
┌──(root㉿kali)-[/home/kali]
└─# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- DESKTOP-JMUOD0E.home anywhere tcp dpt:ssh
DROP tcp -- anywhere anywhere tcp dpt:ssh
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
┌──(root㉿kali)-[/home/kali]
└─# iptables -L -n -v --line-numbers
Chain INPUT (policy ACCEPT 419 packets, 33340 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT 6 -- * * 192.168.1.71 0.0.0.0/0 tcp dpt:22
2 0 0 DROP 6 -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 332 packets, 42224 bytes)
num pkts bytes target prot opt in out source destination
┌──(root㉿kali)-[/home/kali]
└─# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:de:55:8d brd ff:ff:ff:ff:ff:ff
inet 192.168.1.24/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
valid_lft 86249sec preferred_lft 86249sec
inet6 fe80::5a15:2c68:b1af:e663/64 scope link noprefixroute
valid_lft forever preferred_lft forever
내가 뭘 잘못했나요? 마지막 규칙이 활성화되어 있지만 해당 규칙에 내 컴퓨터의 IP가 있으면 내 컴퓨터가 들어갈 수 없기 때문입니다.
내 가상 머신과 NAT 사이의 어댑터 때문인 것 같습니다. 어떻게 생각하시나요?