Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] bind_interface with keepalived

Hi all,

I have setup with keepalived and my interface has both local and "global" IP address assigned. When I use bind_interface mosquito only listens on the local interface. The config file is very simple

# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
bind_interface enxb827eb745276

allow_anonymous true
socket_domain ipv4
pid_file /var/run/mosquitto/

persistence false
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

The interface is:

2: enxb827eb745276: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:74:52:76 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic noprefixroute enxb827eb745276
       valid_lft 5372sec preferred_lft 4472sec
    inet scope global enxb827eb745276
       valid_lft forever preferred_lft forever
    inet6 fd6e:ff9c:7cb8:4ff7:ba27:ebff:fe74:5276/64 scope global dynamic mngtmpaddr
       valid_lft 1629sec preferred_lft 1629sec
    inet6 fe80::ba27:ebff:fe74:5276/64 scope link
       valid_lft forever preferred_lft forever

And the resulting listen
➜  ~ sudo netstat -lnp | grep 1883
tcp        0      0*               LISTEN      14591/mosquitto

This means I cannot get to the server via the VIP. Is there a way to configure this?

Thank you,

Back to the top