I would like to share a VPN connection via a node in the same LAN. The scheme below shows my network system.
LAN A: 10.44.247.0/24
|-* Router Aa: 10.44.247.1, ext XXX.XXX.XXX.XXX
|-* Node Ab: 10.44.247.2 (en0), ppp 192.168.100.36 (ppp0) -| VPN (L2TP)
|-* Node Ac: 10.44.247.3 |
|
LAN B: 192.168.100.0/24 |
|-* Router Ba: 192.168.100.1, ext YYY.YYY.YYY.YYY <------------|
|-* Node Bb: 192.168.100.6
What I want to do is to access Node Bb
from Node Ac
.
Router Aa
routes traffic which is destining 192.168.100.0/24
to 10.44.247.2
. Node Ab
shares internet connections
with a pf
service:
nat on en0 from en0:network to any -> (en0)
nat on ppp0 from en0:network to 192.168.100.0/24 -> (ppp0)
nat on en0 from ppp0:network to 10.44.247.0/24 -> (en0)
I can ping Node Bb
from Node Ac
, and the tracted route shows
as expected:
$ tractroute 192.168.100.6
traceroute to 192.168.100.6 (192.168.100.6), 64 hops max, 52 byte packets
1 10.44.247.1 (10.44.247.1) 1.585 ms 0.355 ms 0.325 ms
2 10.44.247.2 (10.44.247.2) 0.703 ms 0.530 ms 0.545 ms
3 192.168.100.6 (192.168.100.6) 16.429 ms 13.982 ms 13.834 ms
$ ping 192.168.100.6
PING 192.168.100.6 (192.168.100.6): 56 data bytes
Request timeout for icmp_seq 0
64 bytes from 192.168.100.6: icmp_seq=1 ttl=63 time=14.232 ms
Though, I cannot access the node via SSH and other protocols:
$ ssh -vvv 192.168.100.6
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.100.6 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.100.6 [192.168.100.6] port 22.
debug1: Connection established.
debug1: identity file /Users/daehyun/.ssh/id_rsa type 0
debug1: identity file /Users/daehyun/.ssh/id_rsa-cert type -1
debug1: identity file /Users/daehyun/.ssh/id_dsa type -1
debug1: identity file /Users/daehyun/.ssh/id_dsa-cert type -1
debug1: identity file /Users/daehyun/.ssh/id_ecdsa type -1
debug1: identity file /Users/daehyun/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/daehyun/.ssh/id_ed25519 type -1
debug1: identity file /Users/daehyun/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/daehyun/.ssh/id_xmss type -1
debug1: identity file /Users/daehyun/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: read: Operation timed out
I do not see any reasons why it does not work. Any ideas?