우분투 서버 - github에 연결할 수 없습니다

우분투 서버 - github에 연결할 수 없습니다

새로 설치된 Ubuntu 서버의 명령줄에서 github를 사용할 수 없습니다. Ping 및 컬 github은 실패하지만 다른 호스트에서는 제대로 작동합니다.

운영 체제:Ubuntu 22.04.1 LTS

핑 테스트

# google works fine
ping -c3 google.com
...
3 packets transmitted, 3 received, 0% packet loss, time 2004ms

# github fails - each ping attempt results in 'Destination Host Unreachable'
ping -c3 github.com
...
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2051ms

컬 테스트

# google works fine
curl -s --head --request GET google.com > /dev/null; echo $?
0

# github fails
curl -s --head --request GET github.com > /dev/null; echo $?
7

자식 클론 테스트

# fails with 'no route to host'
git clone https://github.com/pi-hole/pi-hole.git
Cloning into 'pi-hole'...
fatal: unable to access 'https://github.com/pi-hole/pi-hole.git/': Failed to connect to github.com port 443 after 18534 ms: No route to host

내가 아는 한, 나는 프록시나 비정상적인 방화벽 설정을 다루고 있지 않습니다.

어떤 조언이라도 감사드립니다.

답변1

새로 설치했는데 Ubuntu 22.04.1 LTS같은 문제가 발생했습니다.

nmcli d show | grep IP4.GATEWAY내 IP4 게이트웨이가 설정되지 않아 "--" 결과가 나온 것으로 나타났습니다 .

설정이 완료되었으며 sudo ip route add default via 192.168.X.Y성공적으로 복제할 수 있습니다.

이게 도움이 되길 바란다 :)

관련 정보