Bind to a specific IP/interface

I have a registered server running on a R-Pi, and have been using it with WIndows clients. The Pi has two IP addresses, one private, one public, with a default route via a VPN tunnel (to service the public IP). My application has been control of devices over serial links. I have been impressed with VirtualHere, though I did notice a slight delay to responses to commands and put it down to the practicalities of getting USB over a network. However, I did notice when using the console client that it was connecting to the public IP of the server. Further investigation with tcpdump confirmed this, which explains the latency.

Is there any way to bind the server to a specific IP? I want it to use the internal IP of the Pi.

#2

Yeah this is pretty useful, so i added the parameter NetworkInterface to the server configuration in version 2.2.4 of the server.

Set that to the IP address of the card you want to bind to, to listen for clients.

Thanks, that will allow for more control.

I also discovered that the IP advertised by Bonjour is the IP address of the first interface (besides loopback) defined, so a simple rearrangement of my network configuration did the trick too. Using the NetworkInterface parameter will close an open port on the public network, however, which is a good thing in my case.