You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is a simple Linux daemon for tun/tap devices, similar to inetd by its logic, but for mentioned interfaceces, instead of a ports.
3
+
Simple yet powerful tun/tap event emitter. Could be used like VPN dispatcher...
4
4
5
5
### How it works:
6
-
First, you create and configure tun/tap device, then run **tuninetd**. It start listening on that interface, until network packet will be received.
7
-
Next, interface will be released and certain command is executed. From now on, daemon in monitoring state.
8
-
After N seconds of interface idle, tuninetd send "stop" command by path, that you define, and start listening interface by its own again.
9
-
10
-
Since, **tuninetd** based on **libpcap**, you can specify filter to trigging "start" event and monitoring iddle (i.e. cutoff unwanted traffic).
11
-
To test/debug filters rules - use tcpdump, because it built upon the same library.
6
+
You should create and configure tun/tap device, then run **tuninetd**. It starts listening on that interface until network traffic will be detected. After that, interface will be released and certain command executed. From now on daemon is in monitoring state.
7
+
After N seconds of interface idle, tuninetd send "stop" command by path that you define and start listening interface by its own again.
8
+
9
+
Since **tuninetd** based on **libpcap**, you can specify filter to trigging "start" and monitoring iddle (i.e. cutoff unwanted traffic). To test/debug pcap rules you might use tcpdump which is based on the same library.
12
10
13
11
**! OR !**
14
12
15
-
You can simply use netfilter nfgroup (*iptables NFLOG target*), for reading packets from. No binding to interface and no libpcap usage. This is more lightweight mode and because of that - more reliable. Option available since v1.1.0.
13
+
You can simply use netfilter nfgroup (*iptables NFLOG target*), for reading packets from. No need binding to tun/tap interface nor heavy libpcap sensor. This is more lightweight mode and because of that - more reliable. Option available since v1.1.0.
16
14
17
15
18
-
**tuninetd** allows you deploy "VPN by demand" or any other "by demand" services, which is the main idea of the project.
16
+
**tuninetd** allows deploy "VPN by demand" or any other "by demand" services, which is the main idea of the project.
19
17
20
18
### Installation:
21
-
If you're using Debian/Ubuntu, check deb-packages folder. Choose appropriate architecture, then run following command with root privileges:
19
+
If you're using Debian/Ubuntu please check deb-packages folder. Choose appropriate architecture, then run following command with root privileges:
22
20
```sh
23
21
# dpkg -i tuninetd_ver_arch.deb
24
22
# apt-get -f install
25
23
```
26
-
To install it from sources, download src folder. In case Debian/Ubuntu, you should also install **build-essential**, **libpcap-dev** and **libnetfilter-log-dev** packages first. To build tuninetd, run:<br/>
24
+
To install from sources download src folder. In case Debian/Ubuntu, you should also install **build-essential**, **libpcap-dev** and **libnetfilter-log-dev** packages first. To build tuninetd just run:<br/>
27
25
```sh
28
26
# cd /download/folder/src
29
27
# make
30
28
```
31
-
After that, bin folder should appears, which contains tuninetd.
29
+
30
+
Congrats! Tuninend is ready to use. Check ./bin folder. :)
You can find example script 'runtunnel.sh', within examples folder.
55
+
Check ```example``` folder to find some shell scripts.
55
56
56
-
To create and up tun device, could be used next commands:
57
+
To create and bring up ```tun``` device, could be used following commands:
57
58
```sh
58
59
# ip tuntap add name tun0 mode tun
59
-
# ip link tun0 up
60
+
# ip link set tun0 up
60
61
```
61
62
62
-
For more information about routing and configuring net devices, please check official documentation.
63
+
For more information about routing and configuring net devices, I strongly suggest LARCT how-to.
63
64
64
-
*! Notice, that the modern Linux distributions periodically send 'icmpv6 router solicitation' packets, which cause tuninetd state changing (call of 'start' script). This situation affects to tun/tap mode without filter (-f) applied.*
65
+
*! Notice ! Modern Linux distributions periodically send 'icmpv6 router solicitation' packets, which cause tuninetd keep or change its status (calling 'start' script for example). This situation appears in tun/tap mode without pcap filter applied.*
65
66
66
67
### License:
67
68
MIT
68
69
### Author:
69
70
Paul aka root4root \<root4root at gmail dot com><br/>
0 commit comments