How to automatically start tinc on Fedora 17

Following the guidance of http://patrakov.blogspot.co.uk/2011/01/writing-systemd-service-files.html it was fairly straightforward to use systemctl on Fedora 17 to start the tinc daemon on startup.

Create a new file /etc/systemd/system/tincd.service containing:

[Unit] 
Description=tinc vpn 
After=network.target 

[Service] 
Type=forking 
ExecStart=/usr/sbin/tincd -n network-name

[Install] 
WantedBy=multi-user.target

Replacing network-name with the name of your network.

Then enable the service to run on startup

sudo systemctl enable tincd

If you’re using the default firewall note you also need to open port 5353 (listed as multicast DNS) to get avahi to work with tinc

Advertisements
1 comment
  1. Hello,

    Thanks for your useful post. The matter is still not properly resolved in Fedora 22’s tinc…

    However, there is one more thing: on Red Hat family systems, an /etc/sysconfig/tinc file is needed, as a standardised place where to pass starting parameters to the tincd daemon. For example, where do you read “network-name” from? Manually editing the /etc/systemd/system/tincd.service would be suboptimal…

    Please see examples of other services needing entries under /etc/sysconfig, such as /etc/dhcpd

    Best regards,
    Răzvan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s