Gateway real IP address

Hello guys,
I’m struggling to get real IP address of my gateway.
My chirpstack gateway bridge (3.7.0-test.2) using semtech_udp and rest of chirpstack servers are in docker in one network, physical lora gateway - separate device connecting via lan.
Stats message:
gateway/240ac4ffffa61bec/event/stats {“gatewayID”:“JArE//+mG+w=”,“ip”:“172.18.0.1”,“time”:“2020-02-04T08:45:04Z”,“location”:{“latitude”:56.8683,“longitude”:24.34129,“altitude”:4,“source”:“GPS”,“accuracy”:0},“configVersion”:"",“rxPacketsReceived”:415,“rxPacketsReceivedOK”:415,“txPacketsReceived”:0,“txPacketsEmitted”:0,“metaData”:{},“statsID”:“ChmcZ8v7RsyOGZaX+MksYQ==”}
IP address is not real IP for the LoRa gateway, rather it is container network default gateway.
Where this address comes from? Should it be like that (network default gw) or I misconfigured something?
Thanks!
Reggie

Did you find a way to solve this problem?

You can configure metadata scripts in the ChirpStack Gateway Bridge and ChirpStack MQTT Forwarder. The only thing you need to do is create a script that returns the IP and add this to the .toml configuration file.

Hi, I have same problem but I don’t understand how can do It.
Could you explain me please?

Thanks in advance

E.g. in the ChirpStack MQTT Forwarder configuration you could configure:

[metadata]
  [metadata.commands]
    gateway_ip=["/command/returning/gateway_ip.sh"]

https://www.chirpstack.io/docs/chirpstack-mqtt-forwarder/configuration.html

The /command/returning/gateway_ip.sh is then up to you to implement (your gateway might have multiple interfaces, thus this might be different per gateway).

2 Likes