Versione 11 del 2010-12-14 01:09:00

Nascondi questo messaggio
Italiano English
Modifica History Actions

TincVPN

Connect to Ninux Network with Tinc VPN

1) Install tinc on your Linux (e.g. apt-get install tinc) MAKE SURE YOU HAVE AT LEAST TINC 1.0.11

2) mkdir /etc/tinc/ninux

3) Create /etc/tinc/ninux/tinc.conf

Name = yournickname
ConnectTo = Norimberga
Mode = switch

Please pick a unique yournickname. Norimberga is our hub server. Mode switch is required because tinc will operate with a tap interface, needed to run olsr on it.

4) Generate a Keypair tincd -n ninux -K

5) Create the hosts folder mkdir /etc/tinc/ninux/hosts/

6) Create the file /etc/tinc/ninux/hosts/Norimberga

This file has the address and the public key of the server

Address = svn.ninux.org

-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA30bZWtIej9kj837Eb8C+nxvEXfy4Jly41tuJYfzpJiP/pTQGaPyF
XDEdfwAq8qJpfLaRfKl0pQ9rbDo4zjSlNW8e/5BxTnobXHcvSD9sm8bNAME2qBkI
plmeWt4RvDmEKDrJWyUIoyKyaTcCkXpfHslTJSBBj7TSjYX9SCfTkSS3GjNDWMjc
C02i2+ZB3balcR+Ea046l/GVFp0htxrUFxew5RDXPmmaiQRF6cpm3fMNtdq9ixz+
uJNjmfHW/lHk4KMUj6KMLca9mS4TWsFxLYmP0jZi7lD2hA3dNCW4nua8HHYPwj+X
Mh/vucAMckowzaf+51bGD+o8HVuM1hm4TwIDAQAB
-----END RSA PUBLIC KEY-----

7) Get an IP address in the subnet 10.0.1.0/24 and add your self in the table on this wiki page: GestioneIndirizzi

8) Create che file /etc/tinc/ninux/tinc-up

ip link set dev ninux up
ip a a dev ninux HEREYOURIPADDRESS/24 broadcast 10.0.1.255
#Adjust MTU
ip link set mtu 1280 dev ninux
iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

Where in place of HEREYOURIPADDRESS you must put the IP address choosen at point 6 of this guide

Make the file executable chmod +x /etc/tinc/ninux/tinc-up

9) Send an email to zioproto@gmail.com with your Nickname choosen at point 3 and your generated public key so we can authorize you in the VPN server.

10) Once you received notification that your public key is authorized you can try to connect

tincd -n ninux

If everything worked out you can ping 10.0.1.1. Now configure olsr to use the interface "ninux"

Connect to Ninux Network with Tinc VPN for Mac

You need to have XCode and MacPorts.

1) Install XCode from Apple site or it can also be obtained from original OSX installation DVD.

2) Install MacPorts (http://www.macports.org/)

3) After Macports is installed, close and reopen your terminal. Update the ports system and ports list.

sudo port selfupdate
sudo port sync

This command will install tinc and all the necessary dependancies.

sudo port install tinc

Configuration files are located in /opt/local/etc/tinc

Tinc can now be configured and executed.

3) Tinc on OS X looks for configuration files in /usr/etc/tinc but we will place the configuration for Ninux VPN into /Library/tinc directory. Navigate to your home directory and create configuration folders for Ninux so type:

mkdir -p Library/tinc/ninux

4) You will need to create the following files and folders within:

Tinc.conf in which you have to put this lines:

Name = yournickname
ConnectTo = Norimberga
Mode = switch
Device = /dev/tap0

Tinc-up in which you have to put this lines:

ip link set dev ninux up
ip a a dev ninux HEREYOURIPADDRESS/24 broadcast 10.0.1.255

Where in place of HEREYOURIPADDRESS you must put the IP address choosen on http://wiki.ninux.org/GestioneIndirizzi

hosts/Norimberga in which you have to put this lines:

Address = svn.ninux.org

-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA30bZWtIej9kj837Eb8C+nxvEXfy4Jly41tuJYfzpJiP/pTQGaPyF
XDEdfwAq8qJpfLaRfKl0pQ9rbDo4zjSlNW8e/5BxTnobXHcvSD9sm8bNAME2qBkI
plmeWt4RvDmEKDrJWyUIoyKyaTcCkXpfHslTJSBBj7TSjYX9SCfTkSS3GjNDWMjc
C02i2+ZB3balcR+Ea046l/GVFp0htxrUFxew5RDXPmmaiQRF6cpm3fMNtdq9ixz+
uJNjmfHW/lHk4KMUj6KMLca9mS4TWsFxLYmP0jZi7lD2hA3dNCW4nua8HHYPwj+X
Mh/vucAMckowzaf+51bGD+o8HVuM1hm4TwIDAQAB
-----END RSA PUBLIC KEY-----

hosts/yournickname in which you have to put your public key (see below)

5) Make sure tinc-up and tinc-down are executable:

chmod +x tinc.conf

6) You will also need to generate pair of keys (private/public) for your client. Do it only after the above files are configured properly! You will be asked for locations of certain files. The default locations are fine.

sudo tincd -c ~/Library/tinc/ninux -K

put your public key into your /hosts/yournickname file.

7) Once you are done send an email to zioproto@gmail.com with your Nickname choosen at point 4 and your generated public key so we can authorize you in the VPN server.

10) Once you received notification that your public key is authorized you can try to connect

sudo tincd -c ~/Library/tinc/ninux --pidfile=/var/run/tincd.pid -D --debug=1

If everything worked out you can ping 10.0.1.1. Now configure olsr to use the interface "ninux"

To stop the client you can kill it be executing:

kill -9 'cat /var/run/tincd.pid'