Created
February 10, 2017 20:43
Revisions
-
jasonehines created this gist
Feb 10, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,80 @@ #how to install tinc sudo eopkg install -c system.devel sudo eopkg install lzo-devel git mkdir Source cd Source git clone https://github.com/gsliepen/tinc.git cd tinc autoreconf --install ./configure sudo make install #switch to root sudo su - mkdir /usr/local/etc/ #add tinc folder to etc #edit tinc-up and add ip link set tun0 up mkdir -p /usr/local/var/run/ modprobe tun #reboot reboot #login in as root again sudo su - # start tinc in debug mode tincd -n [yournetworkname] -D -d3 #test by pinging your server ping [yourserverip] #quit the debug (ctrl+\) #setup the service #change the working directory path nano /usr/lib64/systemd/system/tinc.service contents of modified tinc.service: # This is a mostly empty service, but allows commands like stop, start, reload # to propagate to all tinc@ service instances. [Unit] Description=Tinc VPN After=network.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/true ExecReload=/bin/true WorkingDirectory=/usr/local/etc/tinc [Install] WantedBy=multi-user.target #change the working directory, exec start and exec reload paths nano /usr/lib64/systemd/system/tinc@.service contents of modified tinc@.service: [Unit] Description=Tinc net %i PartOf=tinc.service ReloadPropagatedFrom=tinc.service [Service] Type=simple WorkingDirectory=/usr/local/etc/tinc/%i ExecStart=/usr/local/sbin/tincd -n %i -D ExecReload=/usr/local/sbin/tincd -n %i -kHUP TimeoutStopSec=5 Restart=always RestartSec=60 [Install] WantedBy=tinc.service systemctl enable tinc systemctl start tinc systemctl enable tinc@[yournetworkname] systemctl start tinc@[yournetworkname]