내 네트워크 설정에 문제가 있는 것 같습니다. 누구든지 이 메시지를 통해 내가 뭘 잘못하고 있는지 알 수 있나요?
SSH를 통해 컴퓨터에 연결하는 것이 가능한 것 같습니다.
하지만 다른 서비스에는 문제가 있는 것 같습니다. 누구든지 올바른 방향을 알려주시면 매우 감사하겠습니다! 감사해요
mike@mike-arch:~|⇒ nc -l -p 1234
mike@mike-arch:~|⇒ nc -zvw10 192.168.8.103 1234
Warning: Host 192.168.8.103 isn't authoritative! (direct lookup mismatch)
192.168.8.103 -> mike-arch BUT mike-arch -> 127.0.0.1
192.168.8.103 1234 (search-agent): Connection refused
/etc/호스트
mike@mike-arch:~|⇒ cat /etc/hosts
127.0.0.1 mike-arch
127.0.0.1 localhost
::1 mike-arch
iptables
mike@mike-arch:~|⇒ sudo iptables -L
[sudo] password for mike:
Chain INPUT (policy ACCEPT)
target prot opt source destination
LIBVIRT_INP all -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
LIBVIRT_FWX all -- anywhere anywhere
LIBVIRT_FWI all -- anywhere anywhere
LIBVIRT_FWO all -- anywhere anywhere
DOCKER-USER all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
LIBVIRT_OUT all -- anywhere anywhere
Chain DOCKER (1 references)
target prot opt source destination
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target prot opt source destination
DOCKER-ISOLATION-STAGE-2 all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-ISOLATION-STAGE-2 (1 references)
target prot opt source destination
DROP all -- anywhere anywhere
RETURN all -- anywhere anywhere
Chain DOCKER-USER (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain LIBVIRT_FWI (1 references)
target prot opt source destination
ACCEPT all -- anywhere 192.168.122.0/24 ctstate RELATED,ESTABLISHED
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain LIBVIRT_FWO (1 references)
target prot opt source destination
ACCEPT all -- 192.168.122.0/24 anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain LIBVIRT_FWX (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain LIBVIRT_INP (1 references)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps
Chain LIBVIRT_OUT (1 references)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootpc
ACCEPT tcp -- anywhere anywhere tcp dpt:bootpc
답변1
호스트 파일에서 실제 IP 주소 대신 루프백 주소를 사용하여 호스트 이름을 설정했습니다.
/etc/hosts 파일은 다음과 같아야 합니다:
127.0.0.1 localhost
::1 localhost
127.0.1.1 mike-arch