Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] map IP to topic

or.... as it sounds like your own application if you have them
calling you for support, just make it part of your .... own
application!

Publish the client ip in some status topic you use for this
purpose. Use pub/sub for what it's for. Trying to hack brokers to
get things back out of them is just perverse and generally a
waste of time.

Ben Hardill <hardillb@xxxxxxxxx> wrote:
> 
> 1. IP based geolocation is incredibly inaccurate
> (http://fusion.net/how-an-internet-mapping-glitch-turned-a-random-kansas-f-1793856052)
> and leads to way more problems than it ever solves
> 
> 2. The only way to get this information would be to either
> modify Mosquitto or to try and parse the verbose logs mode e.g.
> 
> 1493915360: New connection from 127.0.0.1 on port 1889.
> 1493915360: New client connected from 127.0.0.1 as
> mosqsub/1342-tiefighter (c1, k60). 1493915360: Sending CONNACK
> to mosqsub/1342-tiefighter (0, 0) 1493915360: Received
> SUBSCRIBE from mosqsub/1342-tiefighter 1493915360: foo (QoS 0)
> 1493915360: mosqsub/1342-tiefighter 0 foo 1493915360: Sending
> SUBACK to mosqsub/1342-tiefighter
> 
> This shows a new connection from 127.0.0.1 with client-id
> mosqsub/1342-tiefighter and subscribing to topic 'foo'
> 
> But verbose logging it likely to have a impact on performance
> at scale.
> 
> On 04/05/17 17:24, John Harrison wrote:
> > Two things:
> > 
> >   * We would like to map the related connected topics on a world map.
> >     Once we have IPs getting Lat/Long is easy. We can already get the
> >     IPs from netstat but it would be nice to know which IP is subscribed
> >     to what to show the relationships between the clients.
> >   * When a customer complains about connectivity issues with their
> >     client it would be nice to be able to get the IP of their client
> >     without having to ask them for it. This would help us troubleshoot.
> >     Many of our customers are not computer savvy so even asking them for
> >     their IPs can be a challenge.
> > 
> > It might be possible to have the clients themselves return the IPs. We'd
> > have to look beyond the firewall of the home routers the clients are
> > behind and it would require a firmware update to all of the clients. I
> > was looking for an easier way.
> > 
> > John
> > 
> > On Thu, May 4, 2017 at 11:09 AM, Ben Hardill <hardillb@xxxxxxxxx
> > <mailto:hardillb@xxxxxxxxx>> wrote:
> > 
> >     What problem are you actually trying to solve here?
> > 
> >     The point to pub/sub protocols is to abstract the publishers/subscribers
> >     from each other via topics.
> > 
> >     On 04/05/17 17:01, John Harrison wrote:
> >     > Hello,
> >     >
> >     > Is there any way I could map the IP addresses associated with the
> >     > clients subscribed to a specific topic? Alternatively, is there a
> >     way I
> >     > could figure out the IP address associated with a particular publish?
> >     >
> >     > John
> >     >
> >     >

Attachment: signature.html
Description: OpenPGP Digital Signature


Back to the top