Hello @brocaar. I did major advances on this configuration and now I´m kind of stuck on this possible simple problem, but I didnt figure out yet how to solve. Hope you can help me out one more time. If everything goes right we can even work on some documentation regardind Kerlink iBTS lora-gateway-bridge configuration.
Here what I have right now:
- lora-gateway-bridge is installed and apparently communicating with the Semtech Packet Forwarder.
- My start.sh script is pointing out to my mqtt brocker using authentication (it was already working on the Wirnet Station version):
LOGGER=“logger -p local1.notice”
#mosquitto
iptables -A INPUT -p tcp --sport 1883 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 1883 -j ACCEPT
/user/lora_gateway_bridge/bin/lora-gateway-bridge --mqtt-username XXXX–mqtt-password YYYY–mqtt-server tcp://10.44.24.158:1883 2>&1 | $LOGGER &
- The problem is that when the gateway tries do connect with my MQTT Brocker I receive the following message:
INFO[0517] backend: connecting to mqtt broker server=“tcp://10.44.24.158:1883”
ERRO[0517] could not setup mqtt backend, retry in 2 seconds: Network Error : dial tcp 10.44.24.158:1883: connect: connection refused
INFO[0519] backend: TLS config is empty
If I try a telnet connection to the server 10.44.24.158 using port 1883 I received a connection refused as well. My loraserver.io is already working well with the Kerlink Wirnet Station, so I dont believe the problem inside it.
Here we have the network configuration on both sides (gateway and loraserver.io)
Gateway:
root@klk-lpbs-062D5A:/user/lora_gateway_bridge # iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp – anywhere anywhere udp spt:1700
ACCEPT udp – anywhere anywhere udp spt:domain
ACCEPT tcp – anywhere anywhere tcp spt:domain flags:!FIN,SYN,RST,ACK/SYN
ACCEPT all – anywhere anywhere
ACCEPT tcp – anywhere anywhere tcp spt:1883
ACCEPT udp – anywhere anywhere udp spt:1883
ACCEPT tcp – anywhere anywhere tcp spt:ssh flags:!FIN,SYN,RST,ACK/SYN
ACCEPT tcp – anywhere anywhere tcp dpt:ssh
ACCEPT udp – anywhere anywhere udp spt:ntp
ACCEPT tcp – anywhere anywhere tcp spt:http flags:!FIN,SYN,RST,ACK/SYN
ACCEPT tcp – anywhere anywhere tcp spt:https flags:!FIN,SYN,RST,ACK/SYN
ACCEPT icmp – anywhere anywhere
ACCEPT tcp – anywhere anywhere tcp flags:RST/RST
ACCEPT udp – anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
REJECT tcp – anywhere anywhere reject-with tcp-reset
REJECT all – anywhere anywhere reject-with icmp-port-unreachable
ACCEPT tcp – anywhere anywhere tcp spt:1883
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp – anywhere anywhere udp dpt:1700
ACCEPT udp – anywhere anywhere udp dpt:domain
ACCEPT tcp – anywhere anywhere tcp dpt:domain
ACCEPT all – anywhere anywhere
ACCEPT tcp – anywhere anywhere tcp spt:1883
ACCEPT udp – anywhere anywhere udp spt:1883
ACCEPT tcp – anywhere anywhere tcp dpt:ssh
ACCEPT tcp – anywhere anywhere tcp spt:ssh
ACCEPT udp – anywhere anywhere udp dpt:ntp
ACCEPT tcp – anywhere anywhere tcp dpt:http
ACCEPT tcp – anywhere anywhere tcp dpt:https
ACCEPT icmp – anywhere anywhere
ACCEPT tcp – anywhere anywhere tcp flags:RST/RST
REJECT tcp – anywhere anywhere reject-with tcp-reset
REJECT all – anywhere anywhere reject-with icmp-port-unreachable
ACCEPT tcp – anywhere anywhere tcp spt:1883
loraserver.io
[root@lorawan-ns-3 log]# netstat -na | grep 1883
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN
tcp6 0 0 :::1883 :::* LISTEN