Score:0

BSD/Mac route with multiple hops / Zerotier managed routes

my flag

In my home network, I have two routers.. my main internet router (192.168.0.1) and a machine that routes certain networks over a different connection (192.168.0.78).

On my Mac, I statically configure the networks that I need to reach to use the machine 192.168.0.78, e.g.

route -n add -host 10.11.10.25 192.168.0.78

I'm now using Zerotier to access machines in my homenetwork when I'm on the road. Zerotier is installed on a machine at home that does NAT, e.g.

Local network IP: 192.168.0.160
Zerotier-IP: 10.144.40.10

On that machine (running Linux) I have the following script enabling NAT/IP-Forwarding:

PHY_IFACE=eth2
ZT_IFACE=ztbtotejk

iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE
iptables -A FORWARD -i $PHY_IFACE -o $ZT_IFACE -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT

I've configured Zerotier to have a managed route for 192.168.0.78 via 10.144.40.10

I can now ssh from everywhere to the machine 192.168.0.78

However, routing does not work

ping 10.11.10.25
PING 10.11.10.25 (10.11.10.25): 56 data bytes
ping: sendto: Network is unreachable
Request timeout for icmp_seq 0

traceroute 10.11.10.25
traceroute to 10.11.10.25 (10.11.10.25), 64 hops max, 52 byte packets
 1  *traceroute: sendto: Network is unreachable
traceroute: wrote 10.11.10.25 52 chars, ret=-1
 *traceroute: sendto: Network is unreachable

any help greatly appreciated!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.