1

I want to route all internet traffic (including udp for sip) through a tinc tunnel (https://www.tinc-vpn.org/). To set up the tinc tunnel is quite straight forward. After starting the tinc daemon on both boxes I have now following routing table:

Destination     Gateway         Genmask         Flags Metric Ref    Use  Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    1024   0        0 eth1
10.1.0.0        0.0.0.0         255.255.0.0     U     0      0        0 sip-tunnel
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth1
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

It is possible to ping to the 10.1.0.X ip address on the box on the other side (in both directions). How can I configure one box (the server) to forward (or route?) all traffic coming from the tinc tunnel to the internet? How do I have to configure the other box (client) to route all internet traffic through the tinc tunnel? Is it possible use this to circumvent a sip block from the ISP (udp traffic)?

2

On the tinc 'server' or the box you want to route the traffic through, you will probably need to setup NAT on the tinc remote to NAT all the traffic from the tinc subnet. If you haven't enabled it, you would need to enable IP forwarding on the tinc remote system.

On any tinc clients you will need to add routes to redirect your Internet access through the tunnel.

ip route add 0.0.0.0/1 via tincremote_tunnel_ip
ip route add 128.0.0.0/1 via tincremote_tunnel_ip

You also would need to add a specific route to the public address of the tinc system you are connecting to since traffic between the two tinc clients must happen outside of the tunnel.

ip route add tincremote_public_ip/32 via 192.168.0.1

Is it possible use this to circumvent a sip block from the ISP (udp traffic)?

Yes. But this will add some latency, and SIP traffic tends to be pretty sensitive to latency. Also you can run into issues with SIP if you don't get your NAT setup correctly.

1
  • 2
    Thanks. What is to do on 'server' side? I would need some hints for the NAT or forwarding.
    – uiop
    May 12 '17 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.