1

I want Dante to transparently choose between either of the two interfaces enp4s0 (Wired Ethernet) and wlp3s0 (Wi-Fi) regardless of their status (up or down). That is

  • when wired, it should choose enp4s0 indeed,
  • when wlp3s0 is added, it should preferably stay on enp4s0 (or maybe do some other clever stuff, I care less about this point here),
  • when wire (enp4s0) is down, i.e. I'm traveling, it should of course switch to wlp3s0 as the only option left.

Now I was under impression that the following configuration should do the trick:

internal: 0.0.0.0 port=1080
external: enp4s0
external: wlp3s0
external.rotation: route

However, to my surprise, when e.g. only enp4s0 is up and wlp3s0 is down, Dante refuses to start up, barking:

error: /etc/sockd.conf: problem on line ??? near token "wlp3s0": could not resolve hostname "wlp3s0": No address associated with hostname.  Please see the Dante manual for more information

I do understand the point here, but there is no technical reason behind such limitation. Manually editing this configuration file every time I'm switching between wire and Wi-Fi would be cumbersome and a big no-no. Is there a clever way to address that issue?

As the last resort, maybe some hook script that would modify the configuration file? Examples of such tools/scripts?

1 Answers1

1

For the time being, I went with goproxy, what a gem! Essentially,

$ goproxy socks -t tcp -p '0.0.0.0:1080'

does the trick without any hassle about binding any particular outgoing interfaces.


I got the following response from Michael Shuldman (maintainer) on the official mailing list for Dante server sockd:

Perhaps there is no technical reason, but in a normal production setting (i.e., as used at a company), specifying that Dante should use a non-existing/non-configured NIC (network interface card) would normally indicate a configuration error. E.g., a sockd.conf copied from another server with different NIC-names, or an OS upgrade causing renaming of some NIC's.

It was therefor thought to be best to error out immediately, to make sure the admin will notice and fix the problem at once, as it's not expected behaviour in the settings our customers use Dante.

For more personal, rather than business usage, some more thought should probably be given to scenarios such as yours, but that has unfortunately not been prioritized.

One future alternative might be to rather than error out, just print a warning and continue as long as there is at least one operable NIC configured in sockd.conf. That's probably something that could be implemented fairly easy without much risk of causing other problems, so I think I'll add a note for that to be looked into for a later release.

A 1.4.3-maintainance release is already under testing, so I don't think anything can be added to it at this point unfortunately, but perhaps for 1.5.0 someone will have a look.