VTUND.CONF(5)
π VTUND.CONF(5) π
okay bestie, gather round, because this is the manual page for vtund.conf β the config file for the VTun (Virtual Tunnel) daemon. it lives in the File Formats Manual section of the manual, iykyk π
β¨ NAME β¨
vtund.conf β the VTun (Virtual Tunnel) daemon configuration file. yes, that's the whole name section, she's brief but iconic π
πΈ DESCRIPTION πΈ
so this is the config file for the vtund(8) virtual tunnel daemon. that's it, that's the vibe β it's where you tell the daemon how to behave π¦
the file is made up of sections that look like this:
name {
keyword value;
keyword value;
..
}
two things you literally cannot skip, bestie, no cap:
- the semicolon at the end of every keyword-value pair is required β¨
- the grouping curly braces
{}are required too π
and if a line starts with a # character? that's a comment. say whatever you want there, nobody's reading it π
the name of a section (name) can be one of these:
optionsβ this section specifies the general options forvtunddefaultβ this one specifies the default options for all sessionssessionβ literally any other word that isn't"options"and isn't"default"introduces a new session and specifies options for it. so yeah, name your sessions whatever, main character energy only π
oh and super important: all keyword names can be abbreviated to a minimum of 4 characters. four. not three. don't push it π
π GENERAL OPTIONS π
this section is named options, and it specifies the general options for vtund(8) to use. the possible keywords are, in order, slay by slay:
type stand|inetdβ the server type.vtund(8)can run in standalone mode (stand), and that's the default β but heads up, standalone mode is not available on no-MMU systems π β or it can be invoked frominetd(8).ipv4β use IPv4 as the transport medium. this is the default. and bestie, inside the tunnel other types are of course usable πipv6β use IPv6 as the transport medium.port portnumberβ the server port number to listen on or connect to. by default,vtund(8)uses port5000.bindaddr listβ the server listen address. this is what you use to forcevtundto bind to a specific address and port in server mode. the format is:
bindaddr {
option value;
};
and the bindaddr options are:
iface if_nameβ use the interface addressif_nameas the bind address.addr addrβ the bind address. can be either an IP address or a host name.
timeout secondsβ general timeout.persist yes|keep|noβ persist mode, and the three flavours hit different:yesβ the client will try to reconnect to the server after the connection terminates.keepβ the client will not remove and re-add thetunXXortapXXdevice when reconnecting.noβ the client will exit. this is the default.
heads up: this option is ignored by the server. she said not my business π
syslog number|nameβ syslog facility specification, either numeric or name (fromsyslog(3)).ppp pathβ path to thepppd(8)program. can be used in session sections.ifconfig pathβ path to theifconfig(8)program. can be used in session sections.route pathβ path to theroute(8)program. can be used in session sections.ip pathβ path to theiproute(8)program. can be used in session sections.firewall pathβ the program for the firewall setup.
and the tea on all of those last ones: all the ppp, ifconfig, route and firewall parameters can specify a filename for the corresponding program, or an equivalent (or even a shell script) π«Ά these parameters get used in session sections to set up network interfaces. periodt.
β¨ SESSION OPTIONS β¨
okay bestie, so these go inside a session section or inside the default section π«Ά The default ones apply to any session section, but a session can totally overwrite them. The parameters are:
passwdsecret β the password for authentication. bestie, this one should be the same on client and server, no cap.typetype β the type of tunnel. Possible tunnel types are:tunβ IP tunnel (no PPP, Ether etc headers)etherβ Ethernet tunnelttyβ serial tunnel (PPP, SLIP etc)pipeβ pipe tunnel
The default tunnel type is tty. This option is ignored by the client.
devicedev β the network device to use. You can choosetapXXfor an ether tunnel ortunXXfor a tun tunnel. By defaultvtund(8)will automatically select an available device πprototcp|udp β the protocol to use. By default,vtund(8)will use TCP. UDP is recommended foretherandtuntunnels only. This option is ignored by the client.nat_hackclient|server|no β which side to use nat_hack on. By default,vtund(8)uses anosetting. The side that the NAT hack is enabled on will perform a delayed UDP socket connect. Should only be enabled for the side outside of the NAT (typically the server)! Settingclienton the server orserveron the client is ignored, as to make a single configuration file reusable on both sides.
This is only relevant if you use proto udp. The NAT hack delays the UDP socket connect until the first UDP packet is received from the other side of the tunnel. The socket is then connected to the actual source port of the packet (on the NAT box) and not to the one indicated in the handshake (which is behind NAT and probably unreachable). The first echo request is also disabled on the side with the NAT hack enabled.
Currently the mechanism works only for one side, for a single NAT traversal. If you enable it for both sides, both will wait for a first packet and the tunnel will never transport any data π
Security warning! Due to the nature of the delayed connection, the tunnel can be hijacked in theory by an attacker behind the same NAT, sending the first UDP packet to the server UDP port, before the real client does. If you do not understand the risks, or want to remain as secure as possible behind this kind of NAT router, use proto tcp as a NAT traversal solution.
Because of the security issue mentioned above, this option might be disabled during compilation (configure --disable-nathack).
timeoutsecounds β Connect timeout.compressmethod[:level] β specifies the compression method to use. Compression methods include:noβ no compressionyesβ default compression methodzlibβ ZLIB compressionlzoβ LZO compression (if compiled in)
You can also specify the level of compression using one digit (1 is best speed, 9 is best compression ratio). This option is ignored by the client.
encryptmethod[:level] β specifies the encryption method to use. Encryption methods include:noβ no encryptionyesβ default encryption method (blowfish128ecb)blowfish128ecbβ Blowfish cipher, 128 bit key, mode ECBblowfish128cbcβ Blowfish cipher, 128 bit key, mode CBCblowfish128cfbβ Blowfish cipher, 128 bit key, mode CFBblowfish128ofbβ Blowfish cipher, 128 bit key, mode OFBblowfish256ecbβ Blowfish cipher, 256 bit key, mode ECBblowfish256cbcβ Blowfish cipher, 256 bit key, mode CBCblowfish256cfbβ Blowfish cipher, 256 bit key, mode CFBblowfish256ofbβ Blowfish cipher, 256 bit key, mode OFBaes128ecboldblowfish128ecbβ Blowfish cipher, 128bit key, mode ECB (for use with 2.6 clients only) AES cipher, 128 bit key, mode ECBaes128cbcβ AES cipher, 128 bit key, mode CBCaes128cfbβ AES cipher, 128 bit key, mode CFBaes128ofbβ AES cipher, 128 bit key, mode OFBaes256ecbβ AES cipher, 256 bit key, mode ECBaes256cbcβ AES cipher, 256 bit key, mode CBCaes256cfbβ AES cipher, 256 bit key, mode CFBaes256ofbβ AES cipher, 256 bit key, mode OFB
ngl theaes128ecb/oldblowfish128ecbbit in the original is a lil squished together β I'm giving it to you exactly as it's written π«Ά
This option is ignored by the client.
keepaliveyes|no|interval:count β enable or disable connection keep-alive. Time interval is a period between connection checks, in seconds, and count is the maximum number of retries (yes = 30:4). This option is ignored by the server.statyes|no β enable or disable statistics. If enabled,vtund(8)will log statistic counters to/var/log/vtund/session_Xevery 5 minutes πspeedkbps β specifies the speed of the connection in kilobits/second. Valid values for kbps are 8,16,32,64,128,256,etc. 0 (the default) means maximum possible speed without shaping. You can specify speed in the form in:out, where in is speed to client, out β from the client. A single number means the same speed for in and out. This option is ignored by the client.srcaddrlist β local (source) address. Used to force vtund to bind to the specific address and port. Format:
srcaddr {
option value;
option value;
..
};
srcaddr options:
ifaceif_name β use interface address if_name as the source address.addraddr β source address. Can be either IP address or host name.portportnumber β source port.
multivalue β control multiple connections. value can beyesorallowto allow multiple connections,noordenyto deny them, orkilloldto allow the new connection and kill the old one. Ignored by the client.uplist β list of programs to run after the connection has been established. Used to initialize protocols, devices, routing and firewall. This option looks like a whole section inside of a session section. For now, it's impossible to runupcommands on no-MMU systems, so the section is ignored there. Format:
up {
option value;
option value;
..
};
Options inside up (and down) blocks:
programpath arguments [wait] β run the specified program. path is the full path to the program, arguments is all arguments to pass to it (enclosed in double quotes). Ifwaitis specified, vtund will wait for program termination. Special characters that can be used inside the arguments parameter:Β΄(single quotes) - group arguments\(back slash) - escape character%d- TUN or TAP device or TTY port name%%(double percent) - same as%d%A- Local IP address%P- Local TCP or UDP port%a- Remote IP address%p- Remote TCP or UDP port%h- Host profile name
ppparguments β run the program specified by thepppstatement in the options section. All special characters described above are valid in arguments here.ifconfigarguments β run the program specified by theifconfigstatement in the options section.routearguments β run the program specified by theroutestatement in the options section.iparguments β run the program specified by theipstatement in the options section.firewallarguments β run the program specified by thefirewallstatement in the options section.
downlist β list of programs to run after the connection has been terminated. It is similar to theupparameter above. Not available on no-MMU systems too. Format:
down {
option value;
option value;
..
};
π NOTES π
Options ignored by the client are supplied by the server at run time, or are used only on the server side. iykyk π
π SEE ALSO π
vtund(8), inetd(8), ifconfig(8), route(8), pppd(8), syslog(3), zlib(3).
π AUTHOR π
Vtund written by Maxim Krasnyansky <max_mk@yahoo.com>. This manual page was derived from comments in config file by Michael Tokarev <mjt@tls.msk.ru>
and that's the whole page bestie π go forth and tunnel, you absolute icon π this was VTUND.CONF(5) β that's the page name and section stamped at the bottom, periodt β¨
π¦ where this page comes from
- debian bookworm: vtun 3.0.4-2+b1
- ubuntu jammy: vtun 3.0.4-2build1
- ubuntu jammy: vtun 3.0.4-2ubuntu0.22.04.1
- ubuntu noble: vtun 3.0.4-2ubuntu3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms