Tinc VPN package for the Qnap NAS platforms
tinc is a Virtual Private Network (VPN) daemon that uses tunnelling and encryption to create a secure private network between hosts on the Internet. tinc is Free Software and licensed under the GNU General Public Licenseversion 2 or later. Because the VPN appears to the IP level network code as a normal network device, there is no need to adapt any existing software. This allows VPN sites to share information with each other over the Internet without exposing any information to others. In addition, tinc has the following features:
Encryption, authentication and compression
All traffic is optionally compressed using zlib or LZO, and OpenSSL is used to encrypt the traffic and protect it from alteration with message authentication codes and sequence numbers.
Automatic full mesh routing
Regardless of how you set up the tinc daemons to connect to each other, VPN traffic is always (if possible) sent directly to the destination, without going through intermediate hops.
Easily expand your VPN
When you want to add nodes to your VPN, all you have to do is add an extra configuration file, there is no need to start new daemons or create and configure new devices or network interfaces.
Ability to bridge ethernet segments
You can link multiple ethernet segments together to work like a single segment, allowing you to run applications and games that normally only work on a LAN over the Internet.
Runs on many operating systems and supports IPv6
Currently Linux, FreeBSD, OpenBSD, NetBSD, MacOS/X, Solaris, Windows 2000, XP, Vista and Windows 7 and 8 platforms are supported. See our section about supported platforms for more information about the state of the ports. tinc has also full support for IPv6, providing both the possibility of tunneling IPv6 traffic over its tunnels and of creating tunnels over existing IPv6 networks.
Tinc Compile Notes
The configure script from the tinc package will fail on the sed that comes with your qnap. If you install sed from the Optware package and run the commands below as admin, the
./configurescript should succeed.
How to use thisKod (Bash):
- cd /bin/
- mv sed sed-busybox
- ln -s /opt/bin/sed sed
This simply provides a QDK enviroment for Tinc on Qnap devices. It does not provde a installable binary package. You will need to:
- Compile Tinc for your device. On an x86 Qnap [URL]http://james.vautin.com/?p=285[/URL] can be helpful but he's wrong about gawk, the problem is with sed, see code:
- # Author: Silas Mariusz
- mkdir -p $src
- cd $src
- ipkg update
- ipkg install grep zlib gawk lzo gcc make openssl openssl-dev
- wget http://www.tinc-vpn.org/packages/tinc-1.0.25.tar.gz
- tar zxvf tinc-1.0.25.tar.gz
- rm tinc-1.0.25.tar.gz
- cd tinc-1.0.25
- # This prevents the BusyBox some things in /bin/ from being called by configure/make
- export PATH=/opt/bin/:$PATH:/opt/bin/
- # But it’s still necessary for force set AWK, as seen below:
- export AWK=/opt/bin/gawk
- # COMPILATION
- /opt/bin/gawk make
- /opt/bin/gawk make install
- $ Restore AWK
- cd ..
- rm -rf $src
- # Done!
- SSH into your Qnap and check this repo out with git.
- copy your compiled tincd binary into the x86 dir. (other platform specific dirs might work for those platforms.)
- Run qbuild to produce a
.qpkgyou can install.
The Tinc qpkg this generates needs a share named "Tinc". I suggest you make this share very private, so no users can access it after setup. For each
/share/Tinc/[netname]/tinc.confan instance of Tinc will be started for that netname's config directory.
Also, when the Tinc qpkg starts it will look for
/share/Tinc/sample. If that doesn't exist it will create a stub network config directory containing the tinc scripts I like and auto generate private and public keys. You should then rename this directory to your desired netname and then rename/edit the tinc.conf.sample file to tinc.conf . You'll need to provide the other
Reminder: Once you get this running, remoke access by all users as they don't need it for Tinc to work and you don't want to accidently leak your private key.
As of May 29, 2014 all my Qnap devices are deployed remotely and there won't be more updates until I have a need for more Qnaps. I'll still try to field support requests to help get people started.
A list of examples of common setups can be found here, along with the typical configuration files, firewall rules and other issues. If you have any questions, comments or examples of your own, please inform us.
- bridging Ethernet segments using tinc under Linux
- creating a bridge to bridge tinc-vpn dhcp system to connect netwerk segments
- cross-compiling tinc for 64-bit Windows under Linux using MinGW
- cross-compiling tinc for Windows under Linux using MinGW
- tinc from behind a firewall
- setting up an IPv6 network managed by tinc
- tinc from behind a masquerading firewall
- tinc on a masquerading firewall
- installing tinc on Mac OS/X
- proxy ARP as an alternative to bridging
- installing tinc on Windows 2000/XP/7/8
- zeroconf IP and DNS configuration
The following links go to external sites: