Skip to main content

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

Hi Ivan,

Please explicitly define your listener first:

```
listener 1883
bind_interface enxb827eb745276
```

Regards,

Roger

On Thu, 10 Feb 2022 at 00:50, Ivan Kunz <ivan.kunz@xxxxxxxxx> wrote:
>
> 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/mosquitto.pid
>
> 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 192.168.1.36/24 brd 192.168.1.255 scope global dynamic noprefixroute enxb827eb745276
>        valid_lft 5372sec preferred_lft 4472sec
>     inet 192.168.1.53/32 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 192.168.1.36:1883       0.0.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,
>    Ivan
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev


Back to the top