Difference between revisions of "Tinc"

From Tmplab
(Yet Another Help For Basic tinc-vpn setup)
(Yet Another Help For Basic tinc-vpn setup)
Line 25: Line 25:
 
  AddressFamily = ipv4
 
  AddressFamily = ipv4
  
== tinc-up ==
+
== tinc-up for client1 ==
  
 
  #!/bin/bash
 
  #!/bin/bash
  ifconfig $INTERFACE 192.168.22.20 netmask 255.255.255.0
+
  ifconfig $INTERFACE 192.168.22.2 netmask 255.255.255.0
  
== tinc-down ==
+
== tinc-down for client1 ==
  
 
  #!/bin/bash
 
  #!/bin/bash

Revision as of 01:29, 25 May 2016

Yet Another Help For Basic tinc-vpn setup

Configuration Directory Structure

/etc/tinc/
          nets.boot
          networkname/
                      tinc.conf
                      tinc-up
                      tinc-down
                      hosts/
                            client1
                            client2
                            tincserver

nets.boot

networkname

tinc.conf for client1

Name=client1
Device=/dev/net/tun
ConnectTo=TincServer
AddressFamily = ipv4

tinc-up for client1

#!/bin/bash
ifconfig $INTERFACE 192.168.22.2 netmask 255.255.255.0

tinc-down for client1

#!/bin/bash
ifconfig $INTERFACE down

hosts/client1

Name=client1
Subnet=192.168.22.2
-----BEGIN RSA PUBLIC KEY-----
....
-----END RSA PUBLIC KEY-----

hosts/client2

Name=client2
Subnet=192.168.22.3
-----BEGIN RSA PUBLIC KEY-----
....
-----END RSA PUBLIC KEY-----

hosts/tincserver

Subnet=192.168.22.1
Address=SERVERPUBLICIP