On 2018-07-27, Jungle Boogie <jungleboog...@gmail.com> wrote:
> Hi All,
>
> Problem I want to solve:
> I would like the tun interface to 'support' more than one host. Right now, 
> when
> I setup a tun interface, it's only activated on the dest IP, regardless of the
> netmask used.
>
> my /etc/hostname.tun0:
> inet 192.168.40.10 255.255.255.0 192.168.40.1
>
> A workaround I've done, is adding a route:
> route add -inet 192.168.40.10/24 192.168.40.10
>
> More info:
> Wireguard is using tun0 on machine A; I would like machine B and machine C to
> also access machine A, all on machine A's tun0 interface - without the need 
> for
> additional tun interfaces.
>
> Fortunately the route trick above works.
>
> Question:
> Is the route add the legitimate way to do this? Can tun support more than one
> host, or is truly point-to-point?

tun is only point-to-point. As you've seen, once the p-p is created you
can route other networks to the destination. Adding a route like this
seems more like the right way to do it, rather than a trick.

The non point-to-point equivalent of tun is tap (which acts like an
ethernet device).


Reply via email to