very high traffic without any load

Lars Kruse lists at sumpfralle.de
Tue May 7 01:56:21 CEST 2019


Hello Rafael,


Am Mon, 6 May 2019 08:28:24 -0400
schrieb Rafael Wolf <rfwolf at gmail.com>:

> Lars, interesting - do you have an example of what that might look like in
> the config file?

just guessing here, but the following should work:

= preparations =
# add a new routing table:
# (use "/etc/iproute2/rt_tables" if the directory does not exist)
echo "42 foo" >>/etc/iproute2/rt_tables.d/custom.conf

# Create an empty routing table. Peers will add routes to their public IP
# address there, as soon as they connect.
ip rule add lookup foo


hosts/peer-up:

#!/bin/sh
# tinc meta traffic must use "main" instead of "foo"
ip rule add to PEER_PUBLIC_IP/32 dport 655 lookup main
# other traffic to the peer's public IP is now directed into the VPN
ip route add PEER_PUBLIC_IP/32 dev "$INTERFACE" table foo


Caveat: I am writing this down without testing.
I hope, that helps.

Cheers,
Lars


More information about the tinc mailing list