1

I have ready many tutorials, but they all seem to be setup as a mesh network which includes 3 servers all connected. I am trying to configure tinc to route all my router traffic through the encrypted VPN similarly to openvpn.

please route me in the right direction.

1 Answer 1

2

It depends on what router you have to a large degree, but let me start by explaining a little about networking to help make your task easier.

VPNs only provide a secure route over an insecure one. SSH is a very simple form of VPN, but a VPN doesn't necessarily provide routing of any kind.

Routers connect routes together. You can tell a router where to route traffic for various IP addresses, though usually they're only aware of a couple routes. (Your LAN and the Internet)

Most routers also include a Firewall and NAT, which are applicable and you should probably learn how those work, but are beyond the scope of this question.

You should probably give more information about your setup (type of routers, if they have tinc VPN support built in, etc.), but from what I can gather, I'm going to assume you have two routers in different locations, you already have a working tinc VPN connecting them, and you want to have outgoing internet traffic from network A travel across the VPN and exit through the WAN port of network B. I'll also assume you're using IPv4.

Simply setup a static route to direct all LAN traffic on network A to the router on network B using the whole internet. (0.0.0.0/0) You'll want to exclude local traffic (e.g. 192.168.0.1/24) so you can still connect to router A.

If you want a simpler solution, I would personally recommend only routing traffic between the networks. (e.g. if network A is 192.168.0.1/24 and network B is 192.168.1.1/24 make router A route 192.168.1.1/24 to router B and vice versa.) Then once computers on both networks can access each other, setup a "HTTP(S) proxy server" for web traffic.

There's a lot more I could say about this, but a proper understanding of networking is central to the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .