<div dir="ltr"><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><div><div><div><div>Let me start with what I'm trying to accomplish. I use tinc mainly to get to subnets behind the daemons and I don't control those subnets and can't guarantee overlap. I was using routing mode and reconfiguring tinc every time i needed to get to a subnet behind a specific daemon. Then I came across switch mode that allowed me to simply add routes based on the IP address of the tinc daemon and not have to reconfigure tinc to get to a different conflicting subnet (just needed to change the route).<br><br></div>However, due to security issues, I want to control which daemons can access other deamons. For the most part, I just want the server to be able to access each daemon and the subnets behind them but not have the daemons access each other or the subnets behind them.<br><br>Everything currently connects through one central server initially, so TunnelServer seemed like the right configuration option. If I understand this setting correctly, it is meant to only allow traffic between nodes that have eachother's (or at least one has the other's) host file on the local system. However, after enabling TunnelServer, my test daemon can no longer ping the tinc ip address of the server.<br><br></div>While trying to figure out what was wrong, I stumbled across this mailing list entry; <a href="http://www.tinc-vpn.org/pipermail/tinc/2010-April/002290.html" target="_blank">http://www.tinc-vpn.org/pipermail/tinc/2010-April/002290.html</a><br><br></div>The solution seems to be to use static mac addresses. I'm totally fine with doing this as all config files are generated programmatically. After doing this, the config files look something like this:<br><br><br></div>client-daemon host file:<br></div><span style="font-size:13.1999998092651px;line-height:19.7999992370605px"># client1</span><br style="font-size:13.1999998092651px;line-height:19.7999992370605px"><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">Subnet = 7a:91:33:09:fc:d3<br>Subnet = <a href="http://10.173.232.50/32" target="_blank">10.173.232.50/32</a><br>Subnet = <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br><br>-----BEGIN RSA PUBLIC KEY-----<br>...<br>-----END RSA PUBLIC KEY-----<br><br><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">client-daemon tinc-up file:<br>#!/bin/bash<br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"># client1<br>ip link set $INTERFACE address 7a:91:33:09:fc:d3<br>ip link set $INTERFACE up<br>ip addr add <a href="http://10.173.232.20/32" target="_blank">10.173.232.20/32</a> dev $INTERFACE<br>ip route add <a href="http://10.173.232.0/22" target="_blank">10.173.232.0/22</a> dev $INTERFACE<br><br><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">I'm mostly looking for guidance on whether it is possible for daemons to only accept traffic from specific daemons in switch mode. If so, what am I doing wrong with my subnet configurations that won't let me even ping from one daemon to the server when TunnelMode is yes?<br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><div><br></div><div>Thanks!</div></div></div><div dir="ltr">-- <br></div><div dir="ltr"><p dir="ltr">J</p>
</div>