# Description file for tinycore extension ($ extbuild sample.desc) # Source STYPE="http" MIRROR="www.tinc-vpn.org/packages" PACKAGE="tinc" SEP="-" VERSION="1.0.19" PKG_EXT=".tar.gz" #RENAME_TO="isc-dhcp4" # Dependencies, Build flags, dev auto-added BUILD_DEPS="openssl-1.0.0 lzo2" RUN_DEPS="openssl-1.0.0 lzo2" FLAGS="--enable-jumbograms" #DBG_PKG=1 #OVERWRITE_LOCAL=1 #NO_DESTDIR=1 #NO_PERL=1 #NO_AUTOTOOLS=1 #NO_OWN_MOD=1 #UPX_COMPRESS=1 # Packaging DEV_MASK="-name *.h -o -name *.c -o -name *.la -o -name *.a -o -name *.m4 -o -name *.pc -o -name *.rh" LOCALE_MASK="-name locale -type d" #DOC_MASK="( -name man -o -name manual -o -name doc ) -a -type d" DOC_MASK="" CONF_MASK="-name *.conf" CONF_MAND_MASK="" # Info DESCRIPTION="tinc - VPN between hosts through the Internet" AUTHORS="Guus Sliepen" MAINTAINER="gutmensch" HOMEPAGE="http://www.tinc-vpn.org" LICENSE="GPL" COMMENTS="For a sample configuration take a look into howto.txt." CHANGE="__TODAY__ " ##### changelog, dont modify! is done by script! ##### #CHANGELOG[6]="2012/07/04 Bump to 1.0.19" #CHANGELOG[5]="2012/02/15 Bumped to 1.0.16, recompiled against openssl-1.0.0 and tc4, added tincd init script." #CHANGELOG[4]="2010/04/26-1 Recompiled against openssl-0.9.8 w/patchlevel n" #CHANGELOG[3]="2010/04/26 Bumped to 1.0.13" #CHANGELOG[2]="2010/02/28 Bumped to 1.0.12" #CHANGELOG[1]="2010/02/03 Fix localstatedir to /var" #CHANGELOG[0]="2010/02/02 Initial version 1.0.11" ############### end of changelog ##################### configure_special_source () { true # dummy_file filename [ $? -eq 0 ] && success || fail } work_special_build () { mkdir -p "${TCB_BLDDIR}/${PACKAGE}/usr/local/etc/init.d" cp "${TCB_SRCDIR}/../tincd" "${TCB_BLDDIR}/${PACKAGE}/usr/local/etc/init.d/" mkdir -p "${TCB_BLDDIR}/${PACKAGE}/usr/local/etc/tinc/hosts" cat < "${TCB_BLDDIR}/${PACKAGE}/usr/local/etc/tinc/tinc.conf.sample" Name = bob ConnectTo = alice PrivateKeyFile = /usr/local/etc/tinc/rsa_key.priv Address = bob.dyndns.org EOF cat < "${TCB_BLDDIR}/${PACKAGE}/usr/local/etc/tinc/hosts/alice.sample" Address alice.dyndns.org Subnet 192.168.1.0/24 -----BEGIN RSA PUBLIC KEY----- ...insert key of alice here... -----END RSA PUBLIC KEY----- EOF cat < "${TCB_BLDDIR}/${PACKAGE}/usr/local/etc/tinc/tinc-up.sample" #!/bin/sh # network of real interface: # ifconfig eth0 192.168.2.20 netmask 255.255.255.0 # keep same IP for tun but change netmask: # the netmask must include all networks that are communicating! # e.g. bob 192.168.2.0/24, alice 192.168.1.0/24 => # netmask: 255.255.252.0 ifconfig \$INTERFACE 192.168.2.20 netmask 255.255.252.0 EOF cat < "${TCB_BLDDIR}/${PACKAGE}/usr/local/etc/tinc/howto.txt" 1. Copy the .sample files to real files. 2. Edit tinc.conf, tinc-up and hosts/alice to your needs. 3. Generate keypair for your pc: sudo tincd -K 4. Give your public key to alice and receive hers, paste into alice host file. 5. Start tincd with sudo tincd. It will automatically try to connect to each host which is specified in ConnectTo and if the auth matches. 6. Add the new copied and edited files, including keys and host files to your backup. Then add /usr/local/etc/init.d/tincd start to your bootlocal.sh. EOF chmod +x ${TCB_BLDDIR}/${PACKAGE}/usr/local/etc/tinc/tinc-up.sample [ $? -eq 0 ] && success || fail }