VPN을 사용하여 소스 네트워크에서 대상 네트워크로 연결합니다. 두 네트워크 모두 DSL 라우터에서 제공하는 홈 네트워크입니다.
두 네트워크 간에 충돌이 발생하지 않도록 대상 네트워크를 다른 IP 주소 범위로 설정했습니다(대상 네트워크 컴퓨터의 IP 주소는 192.168.17로 시작함).7.* - 일반적인 192.168.17 대신8.*).
대상 네트워크의 컴퓨터를 성공적으로 ping하고 추적할 수 있습니다.
$ ping 192.168.177.70
PING 192.168.177.70 (192.168.177.70) 56(84) bytes of data.
64 bytes from 192.168.177.70: icmp_seq=1 ttl=63 time=32.2 ms
64 bytes from 192.168.177.70: icmp_seq=2 ttl=63 time=31.3 ms
64 bytes from 192.168.177.70: icmp_seq=3 ttl=63 time=29.6 ms
...
$ traceroute 192.168.177.70
traceroute to 192.168.177.70 (192.168.177.70), 30 hops max, 60 byte packets
1 this-is-not-a-raspi.fritz.box (192.168.177.70) 34.185 ms 34.184 ms 36.328 ms
2 this-is-not-a-raspi.fritz.box (192.168.177.70) 36.341 ms 37.337 ms 37.348 ms
$
git push
안타깝게도 이 서버에 푸시 하거나 다음을 통해 연결할 수 없습니다 rlogin
.
$ git push --dry-run --verbose
Pushing to [email protected]:/usr/local/git/python/myProject
Connection closed by 192.168.177.70 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
---------------
rlogin [email protected]
Connection closed by 192.168.177.70 port 22
두 명령 모두 시간 초과되는 데 몇 분 정도 걸립니다.
모바일 연결을 통해 스마트폰에서 모바일 핫스팟을 제공할 때(그리고 이전처럼 로컬 컴퓨터의 VPN 연결을 사용할 때) 두 명령 모두 제대로 작동합니다.
두 경우 모두 RDP 연결을 사용하여 원격 시스템에 연결할 수 있습니다.
xfreerdp /v:192.168.177.70 /u:pi /f +clipboard
홈 네트워크에서 연결할 때 이 기능이 제대로 작동하려면 어떻게 해야 합니까 git push
?rlogin
자세한 내용(아래의 모든 ip6 및 mac 주소는 난독화되어야 합니다. 아키텍처: 적절한 경우 실제 텍스트를 대문자 AF로 바꾸십시오):
ip addr
소스 홈 네트워크에서 라우터를 사용하는 경우:
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
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 28:AA:BB:CC:DD:7b brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether e8:AA:BB:CC:DD:bc brd ff:ff:ff:ff:ff:ff
inet 192.168.0.11/24 brd 192.168.0.255 scope global dynamic noprefixroute wlan0
valid_lft 604664sec preferred_lft 604664sec
inet6 2a02:AAAA:BBBB:CCCC::2867/128 scope global dynamic noprefixroute
valid_lft 43065sec preferred_lft 43065sec
inet6 2a02:AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:9076/64 scope global temporary dynamic
valid_lft 86399sec preferred_lft 43199sec
inet6 2a02:AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:c252/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86399sec preferred_lft 43199sec
inet6 fe80::DDDD:EEEE:FFFF:365/64 scope link noprefixroute
valid_lft forever preferred_lft forever
15: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1412 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 192.168.177.201/24 brd 192.168.177.255 scope global noprefixroute tun0
valid_lft forever preferred_lft forever
inet6 fe80::DDDD:EEEE:FFFF:4b69/64 scope link stable-privacy
valid_lft forever preferred_lft forever
ip addr
모바일 핫스팟을 사용하는 경우:
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
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 28:AA:BB:CC:DD:7b brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether e8:AA:BB:CC:DD:bc brd ff:ff:ff:ff:ff:ff
inet 192.168.67.175/24 brd 192.168.67.255 scope global dynamic noprefixroute wlan0
valid_lft 3569sec preferred_lft 3569sec
inet6 2a02:AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:9076/64 scope global temporary dynamic
valid_lft 3572sec preferred_lft 3572sec
inet6 2a02:AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:41bc/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 3572sec preferred_lft 3572sec
inet6 fe80::DDDD:EEEE:FFFF:41bc/64 scope link noprefixroute
valid_lft forever preferred_lft forever
16: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1412 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 192.168.177.201/24 brd 192.168.177.255 scope global noprefixroute tun0
valid_lft forever preferred_lft forever
inet6 fe80::DDDD:EEEE:FFFF:835f/64 scope link stable-privacy
valid_lft forever preferred_lft forever
ip addr
원격 컴퓨터에서(모바일 핫스팟을 통해 연결된 경우):
pi@this-is-not-a-raspi:~$ ip addr
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
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 88:AA:BB:CC:DD:b5 brd ff:ff:ff:ff:ff:ff
inet 192.168.177.70/24 brd 192.168.177.255 scope global dynamic noprefixroute enp1s0
valid_lft 598756sec preferred_lft 598756sec
inet6 fe80::AAAA:BBBB:CCCC:66aa/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: wlp0s20f3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether f8:AA:BB:CC:DD:c7 brd ff:ff:ff:ff:ff:ff
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:AA:BB:CC:DD:9e brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
5: virbr1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:AA:BB:CC:DD:16 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.1/24 brd 192.168.100.255 scope global virbr1
valid_lft forever preferred_lft forever
pi@this-is-not-a-raspi:~$
tcdump
모바일 네트워크를 사용하는 경우:ssh [email protected]
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
00:47:32.226287 IP user-computer.47739 > 77.15.121.102.ipsec-nat-t: UDP-encap: ESP(spi=0xcbf45046,seq=0x4e), length 404
00:47:32.386227 IP6 2a02:AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:9076.49668 > fra07s63-in-x2005.1e100.net.https: Flags [FP.], seq 3522424528, ack 2611353171, win 501, options [nop,nop,TS val 1460897741 ecr 3651489834], length 0
00:47:32.386256 IP6 2a02:AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:9076.60320 > fra24s11-in-x0e.1e100.net.https: Flags [FP.], seq 720768930:720769032, ack 218366535, win 501, options [nop,nop,TS val 642136371 ecr 1993197571], length 102
00:47:32.391786 IP6 user-computer.40601 > fra24s11-in-x0e.1e100.net.443: UDP, length 1226
4 packets captured
191 packets received by filter
3 packets dropped by kernel
tcdump
홈 라우터를 사용하는 경우: