2018-10-28 18:50:37 UTC
I'm having a strange issue (that admittedly may or not be related with
mongodb) which I'll try to break down as much as I can below.
If anybody needs any more info please just ask.
My goal is to have mongodb bind on localhost and a vpn inteface that uses
zeroconf. The issue is that mongod seems to always also bind to the public
Debian 9.5 (fully updated, network managed with systemd)
MongoDB 4.0.3 (official from repo.mongodb.org with fully default config
except for changing bindIp)
lo -> localhost
ens3 -> public interface with public ip assigned by the hosting company
vpn -> Tinc vpn interface with zeroconf ip (169.254.x.y) assigned by
systemd-networkd and that gets resolved by systemd-resolved as
All of the above is an updated setup (from scratch) of an older machine
that was doing the exact same function but using debian 8, mongo 3.4,
ifupdown scripts (instead of systemd-networkd) and Avahi (instead of
The old machine has the correct behavior so I'm assuming that the issue is
with the updated network setup or mongodb.
Below are the different behaviors according to what I set on net.bindIp in
Works as expected
This works correctly and binds only to those ips but it's not useful
because zeroconf is a dynamic ip
Binds to localhost, the vpn ip (169.254.x.y) but also binds to my public ip
which is the main issue here.
This is what I need and how it's setup and running correctly on the
Binds to the vpn ip (169.254.x.y) and again also binds on public ip.
As you can see, it appears as whenever I use hostname.local, mongo also
binds to the public ip.
From the console running "ping hostname.local" correctly resolves to the
zeroconf ip. Setting the assigned zeroconf ip directly on bindIp also seems
to work and doesn't bind to the public ip, although it's not what I need.
I've tried increasing mongod's log verbosity to try and detect if anything
was being outputted in relation to the network but couldn't find anything
So, although this issue is being manifested on mongo, it's still possible
that it's some network configuration issue that's the real culprit.
Nevertheless, if anybody has any ideas on why this may be happening or any
kind of suggestions about what to try I'd be greatly appreciated.
You received this message because you are subscribed to the Google Groups "mongodb-user"
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/27407de4-2f63-4296-a49e-1c9dec41642a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.