1wsdd(1) General Commands Manual wsdd(1)
2
3
4
6 wsdd - A Web Service Discovery host and client daemon.
7
9 wsdd [options]
10
12 wsdd implements both a Web Service Discovery (WSD) host and a WSD
13 client daemon. The host implementation enables (Samba) hosts, like your
14 local NAS device, to be found by Web Service Discovery clients like
15 Windows. The client mode allows searching for other WSD hosts on the
16 local network.
17
18 The default mode of operation is the host mode. The client or discovery
19 mode must be enabled explictely. Unless configured otherwise, the host
20 mode is always active. Both modes can be used at the same time.
21
23 General options
24 -4, --ipv4only
25 See below.
26
27 -6, --ipv6only
28 Restrict to the given address family. If both options are speci‐
29 fied no addreses will be available and wsdd will exit.
30
31 -c DIRECTORY, --chroot DIRECTORY
32 chroot into the given DIRECTORY after initialization has been
33 performed and right before the handling of incoming messages
34 starts. The new root directory can be empty. Consider using the
35 -u option as well.
36
37 -h, --help
38 Show help and exit.
39
40 -H HOPLIMIT, --hoplimit HOPLIMIT
41 Set the hop limit for multicast packets. The default is 1 which
42 should prevent packets from leaving the local network segment.
43
44 -i INTERFACE/ADDRESS, --interface INTERFACE/ADDRESS
45 Specify on which interfaces wsdd will be listening on. If no
46 interfaces are specified, all interfaces are used. Loop-back
47 interfaces are never used, even when explicitly specified. For
48 interfaces with IPv6 addresses, only link-local addresses will
49 be used for announcing the host on the network. This option can
50 be provided multiple times in order to restrict traffic to more
51 than one interface. This option also accepts IP addresses that
52 the service should bind to. For IPv6, only link local addresses
53 are actually considered as noted above.
54
55 -s, --shortlog
56 Use a shorter logging format that only includes the level and
57 message. This is useful in cases where the logging mechanism,
58 like systemd on Linux, automatically prepends a date and process
59 name plus ID to the log message.
60
61 -u USER[:GROUP], --user USER[:GROUP]
62 Change user (and group) when running before handling network
63 packets. Together with -c this option can be used to increase
64 security if the execution environment, like the init system,
65 cannot ensure this in another way.
66
67 -U UUID, --uuid UUID
68 The WSD specification requires a device to have a unique address
69 that is stable across reboots or changes in networks. In the
70 context of the standard, it is assumed that this is something
71 like a serial number. wsdd uses the UUID version 5 with the DNS
72 namespace and the host name of the local machine as inputs.
73 Thus, the host name should be stable and not be modified, e.g.
74 by DHCP. However, if you want wsdd to use a specific UUID you
75 can use this option.
76
77 -v, --verbose
78 Additively increase verbosity of the log output. A single occur‐
79 rence of -v/--verbose sets the log level to INFO. More -v
80 options set the log level to DEBUG.
81
82 -V, --version
83 Show the version number and exit.
84
85 Host Mode Options
86 -d DOMAIN, --domain DOMAIN
87 Assume that the host running wsdd joined an ADS domain. This
88 will make wsdd report the host being a domain member. It dis‐
89 ables workgroup membership reporting. The (provided) hostname is
90 automatically converted to lower case. Use the `-p` option to
91 change this behavior.
92
93 -n HOSTNAME, --hostname HOSTNAME
94 Override the host name wsdd uses during discovery. By default
95 the machine's host name is used (look at hostname(1)). Only the
96 host name part of a possible FQDN will be used in the default
97 case.
98
99 -o, --no-host
100 Disable host operation mode. If this option is provided, the
101 host cannot be discovered by other (Windows) hosts. It can be
102 useful when client/discovery mode is used and no announcement of
103 the host that runs wsdd should be made.
104
105 -p, --preserve-case
106 Preserve the hostname as it is. Without this option, the host‐
107 name is converted as follows. For workgroup environments (see
108 -w) the hostname is made upper case by default. Vice versa it is
109 made lower case for usage in domains (see -d).
110
111 -t, --no-http
112 Do not service HTTP requests of the WSD protocol. This option is
113 intended for debugging purposes where another process may handle
114 the Get messages.
115
116 -w WORKGROUP, --workgroup WORKGROUP
117 By default wsdd reports the host is a member of a workgroup
118 rather than a domain (use the -d/--domain option to override
119 this). With -w/--workgroup the default workgroup name can be
120 changed. The default work group name is WORKGROUP. The (pro‐
121 vided) hostname is automatically converted to upper case. Use
122 the `-p` option to change this behavior.
123
124 Client/Discovery Mode Options
125 -D, --discovery
126 Enable discovery mode to search for other WSD hosts/servers.
127 Found hosts are logged with INFO priority. The server interface
128 (see below) can be used for a programatic interface. Refer to
129 the man page for details of the server interface.
130
131 -l PATH/PORT, --listen PATH/PORT
132 Specify the location of the socket for the server programming
133 interface. If the option value is numeric, it is interpreted as
134 numeric port for a TCP server port. Then, the server socket is
135 bound to the localhost only. If the option value is non-
136 numeric, it is assumed to be a path to UNIX domain socket to
137 which a client can connect to.
138
139
141 Handle traffic on eth0 and eth2 only, but only with IPv6 addresses
142 wsdd -i eth0 -i eth2 -6
143
144 or
145
146 wsdd --interface eth0 --interface eth2 --ipv6only
147
148 Set the Workgroup according to smb.conf, be verbose, run with dropped priv‐
149 ileges, and change the root directory to an (empty) directory
150 SMB_GROUP=$(grep -i '^workgroup=' smb.conf | cut -f2 -d= | tr -d
151 '[:blank:]')
152
153 wsdd -v -w $SMB_GROUP -u daemon:daemon -c /var/run/wsdd/chroot
154
156 Traffic for the following ports, directions and addresses must be
157 allowed:
158
159 - Incoming and outgoing traffic to udp/3702 with multicast source/des‐
160 tination: 239.255.255.250 for IPv4 and ff02::c for IPv6
161
162 - Outgoing unicast traffic from udp/3702
163
164 - Incoming traffic to tcp/5357
165
166 You should further restrict the traffic to the (link-)local subnet,
167 e.g. by using the `fe80::/10` address space for IPv6.
168
170 When the discovery mode is used, wsdd provides a text-based line-ori‐
171 ented server interface to query information and trigger actions. The
172 interface can be used with TCP and UNIX domain sockets (see above). The
173 TCP socket is bound to the local host only. The following commands can
174 be issued:
175
176 probe - Search for devices
177 probe [INTERFACE]
178
179 Triggers a Probe message on the provided INTERFACE (eth0, e.g.) to
180 search for WSD hosts. If no interface is provided, all interfaces wsdd
181 listens on are probed. A Probe messages initiates the discovery mes‐
182 sage flow. It may take some time for hosts to be actually discovered.
183
184 list - List discovered devices
185 list
186
187 Returns a tab-separated list of discovered devices with the following
188 information:
189
190 UUID UUID of the discovered device. Note that a multi-homed device
191 should appear only once but with multiple addresses (see below)
192
193 name The name reported by the device. For discovered Windows hosts,
194 it is the configured computer name that is reported here.
195
196 association
197 Specifies the domain or workgroup to which the discovered host
198 belongs to. The type of the association (workgroup or domain)
199 is separated from its value by a colon.
200
201 last_seen
202 The date and time the device was last seen as a consequence of
203 Probe/Hello messages provided in ISO8601 with seconds.
204
205 addresses
206 List of all transport addresses that were collected during the
207 discovery process delimited by commas. Addresses are provided
208 along with the interface (separated by '%') on which they were
209 discovered. IPv6 addresses are reported on square brackets.
210 Note that the reported addresses may not match the actual device
211 on which the device may be reached.
212
213 clear - Clear list of discovered devices clear
214 Clears the list of all discovered devices. Use the probe command to
215 search for devices again.
216
218 wsdd does not implement any security feature, e.g. by using TLS for the
219 http service. This is because wsdd's intended usage is within private,
220 i.e. home, LANs. The Hello message contains the hosts transport
221 address, i.e. the IP address which speeds up discovery (avoids Resolve
222 message).
223
225 Using only IPv6 on FreeBSD
226 If wsdd is running on FreeBSD using IPv6 only, the host running wsdd
227 may not be reliably discovered. The reason appears to be that Windows
228 is not always able to connect to the HTTP service for unknown reasons.
229 As a workaround, run wsdd with IPv4 only.
230
231 Tunnel/Bridge Interface
232 If tunnel/bridge interfaces like those created by OpenVPN or Docker
233 exist, they may interfere with wsdd if executed without providing an
234 interface that it should bind to (so it binds to all). In such cases,
235 the wsdd hosts appears after wsdd has been started but it disappears
236 when an update of the Network view in Windows Explorer is forced,
237 either by refreshing the view or by a reboot of the Windows machine.
238 To solve this issue, the interface that is connected to the network on
239 which the host should be announced needs to be specified with the
240 -i/--interface option. This prevents the usage of the tunnel/bridge
241 interfaces.
242
243 Background: Tunnel/bridge interfaces may cause Resolve requests from
244 Windows hosts to be delivered to wsdd multiple times, i.e. duplicates
245 of such request are created. If wsdd receives such a request first from
246 a tunnel/bridge it uses the transport address (IP address) of that
247 interface and sends the response via unicast. Further duplicates are
248 not processed due to the duplicate message detection which is based on
249 message UUIDs. The Windows host which receives the response appears to
250 detect a mismatch between the transport address in the ResolveMatch
251 message (which is the tunnel/bridge address) and the IP of the sending
252 host/interface (LAN IP, e.g.). Subsequently, the wsdd host is ignored
253 by Windows.
254
255
256
257 wsdd(1)