.\"t .\" Automatically generated by Pandoc 2.1.1 .\" .TH "IRTT\-SERVER" "1" "February 11, 2018" "v0.9.0" "IRTT Manual" .hy .SH NAME .PP irtt\-server \- Isochronous Round\-Trip Time Server .SH SYNOPSIS .PP irtt server [\f[I]args\f[]] .SH DESCRIPTION .PP \f[I]irtt server\f[] is the server for irtt(1) (irtt.html). .SH OPTIONS .TP .B \-b \f[I]addresses\f[] Bind addresses (default \[lq]:2112\[rq]), comma separated list of: .RS .PP .TS tab(@); l l. T{ Format T}@T{ Address Type T} _ T{ :port T}@T{ unspecified address with port, use with care T} T{ host T}@T{ host with default port 2112, see Host formats below T} T{ host:port T}@T{ host with specified port, see Host formats below T} T{ %iface T}@T{ all addresses on interface iface with default port 2112 T} T{ %iface:port T}@T{ all addresses on interface iface with port T} .TE .PP \f[B]Note:\f[] iface strings may contain * to match multiple interfaces .RE .TP .B \-d \f[I]duration\f[] Max test duration, or 0 for no maximum (default 0s, see Duration units below) .RS .RE .TP .B \-i \f[I]interval\f[] Min send interval, or 0 for no minimum (default 10ms, see Duration units below) .RS .RE .TP .B \-l \f[I]length\f[] Max packet length (default 0), or 0 for no maximum. Numbers less than size of required headers will cause test packets to be dropped. .RS .RE .TP .B \-\-hmac=\f[I]key\f[] Add HMAC with \f[I]key\f[] (0x for hex) to all packets, provides: .RS .IP \[bu] 2 Dropping of all packets without a correct HMAC .IP \[bu] 2 Protection for server against unauthorized discovery and use .RE .TP .B \-\-timeout=\f[I]duration\f[] Timeout for closing connections if no requests received on a connection (default 1m0s, see Duration units below). 0 means no timeout (not recommended, especially on public servers). Max client interval will be restricted to timeout/4. .RS .RE .TP .B \-\-pburst=\f[I]#\f[] Packet burst allowed before enforcing minimum interval (default 5) .RS .RE .TP .B \-\-fill=\f[I]fill\f[] Payload fill if not requested (default pattern:69727474). Possible values include: .RS .PP .TS tab(@); l l. T{ Value T}@T{ Fill T} _ T{ \f[I]none\f[] T}@T{ Echo client payload (insecure on public servers) T} T{ \f[I]rand\f[] T}@T{ Use random bytes from Go's math.rand T} T{ \f[I]pattern:\f[]XX T}@T{ Use repeating pattern of hex (default 69727474) T} .TE .RE .TP .B \-\-allow\-fills=\f[I]fills\f[] Comma separated patterns of fill requests to allow (default rand). See options for \f[I]\[en]fill\f[]. Notes: .RS .IP \[bu] 2 Patterns may contain * for matching .IP \[bu] 2 Allowing non\-random fills insecure on public servers .IP \[bu] 2 Use \f[I]\-\-allow\-fills=\[lq]\[rq]\f[] to disallow all fill requests .RE .TP .B \-\-tstamp=\f[I]modes\f[] Timestamp modes to allow (default dual). Possible values: .RS .PP .TS tab(@); l l. T{ Value T}@T{ Allowed Timestamps T} _ T{ \f[I]none\f[] T}@T{ Don't allow any timestamps T} T{ \f[I]single\f[] T}@T{ Allow a single timestamp (send, receive or midpoint) T} T{ \f[I]dual\f[] T}@T{ Allow dual timestamps T} .TE .RE .TP .B \-\-no\-dscp Don't allow setting dscp (default false) .RS .RE .TP .B \-\-set\-src\-ip Set source IP address on all outgoing packets from listeners on unspecified IP addresses (use for more reliable reply routing, but increases per\-packet heap allocations) .RS .RE .TP .B \-\-gc=\f[I]mode\f[] Sets garbage collection mode (default on). Possible values: .RS .PP .TS tab(@); l l. T{ Value T}@T{ Meaning T} _ T{ \f[I]on\f[] T}@T{ Garbage collector always on T} T{ \f[I]off\f[] T}@T{ Garbage collector always off T} T{ \f[I]idle\f[] T}@T{ Garbage collector enabled only when idle T} .TE .RE .TP .B \-\-thread Lock request handling goroutines to OS threads .RS .RE .TP .B \-h Show help .RS .RE .TP .B \-v Show version .RS .RE .SS Host formats .PP Hosts may be either hostnames (for IPv4 or IPv6) or IP addresses. IPv6 addresses must be surrounded by brackets and may include a zone after the % character. Examples: .PP .TS tab(@); l l. T{ Type T}@T{ Example T} _ T{ IPv4 IP T}@T{ 192.168.1.10 T} T{ IPv6 IP T}@T{ [2001:db8:8f::2/32] T} T{ IPv4/6 hostname T}@T{ localhost T} .TE .PP \f[B]Note:\f[] IPv6 addresses must be quoted in most shells. .SS Duration units .PP Durations are a sequence of decimal numbers, each with optional fraction, and unit suffix, such as: \[lq]300ms\[rq], \[lq]1m30s\[rq] or \[lq]2.5m\[rq]. Sanity not enforced. .PP .TS tab(@); l l. T{ Suffix T}@T{ Unit T} _ T{ h T}@T{ hours T} T{ m T}@T{ minutes T} T{ s T}@T{ seconds T} T{ ms T}@T{ milliseconds T} T{ ns T}@T{ nanoseconds T} .TE .SH SECURITY .PP Running an IRTT server that's open to the outside world requires some additional attention. For starters, irtt server's command line flags should be used to, at a minimum: .IP \[bu] 2 Restrict the duration (\f[I]\-d\f[]), interval (\f[I]\-i\f[]) and length (\f[I]\-l\f[]) of tests, particularly for public servers .IP \[bu] 2 Set an HMAC key (\f[I]\-\-hmac\f[]) for private servers to prevent unauthorized discovery and use .PP In addition, there are various systemd(1) options available for securing services. The irtt.service file included with the distribution sets many commonly used options, but should not be considered exhaustive. .PP To secure a server for public use, additional steps may be taken that are outside of the scope of this documentation, including but not limited to: .IP \[bu] 2 Setting up an iptables firewall (only UDP port 2112 must be open) .IP \[bu] 2 Setting up a chroot jail .PP It should be noted that there are no known security vulnerabilities in the Go language at this time, and the steps above, in particular the chroot jail, may or may not serve to enhance security in any way. Go\-based servers are generally regarded as safe because of Go's high\-level language constructs for memory management, and at this time IRTT makes no use of Go's unsafe (https://golang.org/pkg/unsafe/) package. .SH EXIT STATUS .PP \f[I]irtt server\f[] exits with one of the following status codes: .PP .TS tab(@); l l. T{ Code T}@T{ Meaning T} _ T{ 0 T}@T{ Success T} T{ 1 T}@T{ Runtime error T} T{ 2 T}@T{ Command line error T} T{ 3 T}@T{ Two interrupt signals received T} .TE .SH EXAMPLES .TP .B $ irtt server Starts the server and listens on all addresses (unspecified address) .RS .RE .TP .B $ irtt server \-d 30s \-i 20ms \-l 256 \-\-fill=rand \-\-allow\-fills=\[lq]\[rq] Starts the server and listens on all addresses, setting the maximum test duration to 30 seconds, minimum interval to 20 ms, and maximum packet length to 256 bytes. Disallows fill requests and forces all return packets to be filled with random data. .RS .RE .TP .B $ irtt server \-b 192.168.100.11:64381 \-\-hmac=secret Starts the server and binds to IPv4 address 192.168.100.11, port 64381. Requires a valid HMAC on all packets with the key \f[I]secret\f[], otherwise packets are dropped. .RS .RE .SH SEE ALSO .PP irtt(1) (irtt.html), irtt\-client(1) (irtt-client.html) .PP IRTT GitHub repository (https://github.com/peteheist/irtt/)