# Firewall Settings and "gateway\_ID"

**URL:** <https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885>\
**Category:** Kerlink Gateways\
**Created:** [June 13, 2017, 11:08am UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885 "2017-06-13T11:08:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![maus](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/maus/32/4922_2.png) [@maus](https://www.thethingsnetwork.org/forum/u/maus)\
**Post date:** [June 13, 2017, 11:08am UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/1 "2017-06-13T11:08:43Z")

</div>

Hi,

I have setup a Kerlink IoT Station as TTN Gateway.  
The _good message_ is, that I’m able to join a Node by OTAA over this Gateway. The node ‘last seen’-status gets updated accordingly.

The _bad message_ is that the gateway’s status remains on `not connected` in the console.

Questions:

- shouldn’t the `gateway_id` within the `local_conf.json` be adapted to the `Gateway ID` set under the gateway’s settings on the console? If so, why is that information missing within the [documentation](https://www.thethingsnetwork.org/docs/gateways/kerlink/config.html)?

- I assume that the network hosting the Gateway should allow outward UDP Traffic on port 1700. What other ports should be reachable and therefore require adaptions on the firewall?

Many thanks for your support.

---

<div class="post-metadata">

**Author:** ![maus](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/maus/32/4922_2.png) [@maus](https://www.thethingsnetwork.org/forum/u/maus)\
**Post date:** [June 14, 2017, 9:53am UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/2 "2017-06-14T09:53:53Z")

</div>

The documentation seems to be rather incomplete. I somehow collected all missing pieces to get the full picture on the Kerlink’s configuration.

The generated `local_conf.json` seems to be incomplete. I somehow miss the Link to what I have registered within the console. In Kersing’s repository for the Poly Package forwarder I found a [local\_conf.json,sample](https://github.com/kersing/packet_forwarder/blob/master/mp_pkt_fwd/local_conf.json.sample) which looks to be more complete.

> ```
> {
> /* Put there parameters that are different for each gateway (eg. pointing one gateway to a test server while the others stay in production) */
> /* Settings defined in global_conf will be overwritten by those in local_conf */
> "gateway_conf": {
> "gateway_ID": "CHANGE-ME", /* you must pick a unique 64b number for each gateway (represented by an hex string) */
> "contact_email" : "CHANGE-ME",
> "description": "CHANGE-ME",
> "servers": [
> {
> "serv_type": "ttn",
> "server_address": "<see TTN console>",
> "serv_gw_id": "<gateway name from console>",
> "serv_gw_key": "<gateway secret key from console>",
> "serv_enabled": true           
> }
> ],
> "gps": true,
> "fake_gps": true,
> "ref_latitude": CHANGE-ME, /* put your latitude here */
> "ref_longitude": CHANGE-ME, /* put your longitude here */
> "ref_altitude": CHANGE-ME
> }
> }
> 
> ```

`serv_gw_id` and `serv_gw_key` are the parameters from the gateway’s entry on the ttn console.  
In case you have already misconfigured `gateway_ID` as I have done it, you can re-generate a new ID by using [this script](https://github.com/Lora-net/packet_forwarder/blob/master/lora_pkt_fwd/update_gwid.sh).

Now I hope the getaway becomes active on the console.

---

<div class="post-metadata">

**Author:** ![jpmeijers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jpmeijers/32/44875_2.png) [@jpmeijers](https://www.thethingsnetwork.org/forum/u/jpmeijers)\
**Post date:** [June 14, 2017, 11:25am UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/3 "2017-06-14T11:25:54Z")

</div>

Can you perhaps clarify which packet forwarder you are using, or which instructions you used. You are mixing up different one’s configuration here. If I know which packet forwarder you are using, I can tell you which config value you should use.

---

<div class="post-metadata">

**Author:** ![maus](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/maus/32/4922_2.png) [@maus](https://www.thethingsnetwork.org/forum/u/maus)\
**Post date:** [June 14, 2017, 12:14pm UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/4 "2017-06-14T12:14:19Z")

</div>

Thanks. Meanwhile I realized that there are several package forwarder used and described. I also noticed that a [new package forwarder got released recently](https://www.thethingsnetwork.org/forum/t/new-ttn-packet-forwarder-available/7644) (12d ago).

Initially I followed the official documentation [here](https://www.thethingsnetwork.org/docs/gateways/kerlink/config.html). This guide links to a binary of the [TTN Package forwarder V1.3](https://github.com/TheThingsNetwork/kerlink-station-firmware/blob/master/dota/dota_thethingsnetwork_v1.3_EU.tar.gz) which has been committed a year ago.

Thus I assume that I’m using the V1.3.

---

<div class="post-metadata">

**Author:** ![jpmeijers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jpmeijers/32/44875_2.png) [@jpmeijers](https://www.thethingsnetwork.org/forum/u/jpmeijers)\
**Post date:** [June 14, 2017, 12:30pm UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/5 "2017-06-14T12:30:04Z")

</div>

After you did the first step in that tutorial, you have a .log file on your usb flash drive. Apparently the EUI of the gateway will be written somewhere inside this logfile. Alternatively the EUI is written on the outside of the gateway enclosure.

When you have the EUI, which is a 16 HEX character code, you can use this to register the gateway on the console. When registering the gateway, choose **I’m using the legacy packet forwarder**. Then the text field above it will change from “gateway id” to “gateway eui”.

I don’t see any mention of the local\_conf.json file on the kerlink. But in theory the gateway\_ID parameter should have the value of the EUI.

---

<div class="post-metadata">

**Author:** ![maus](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/maus/32/4922_2.png) [@maus](https://www.thethingsnetwork.org/forum/u/maus)\
**Post date:** [June 14, 2017, 12:45pm UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/6 "2017-06-14T12:45:00Z")

</div>

Sounds all reasonable. I redeployed the forwarder to my Kerlink.

The EUI marked in the logfile was only 4 bytes long. I used that one from local\_conf.json.

Now the TTN-Console fails to register the gateway: ![](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/a/a5eca44f88d7fa275853cfc66dc147ecc98b6c94.png)

---

<div class="post-metadata">

**Author:** ![maus](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/maus/32/4922_2.png) [@maus](https://www.thethingsnetwork.org/forum/u/maus)\
**Post date:** [June 14, 2017, 1:08pm UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/7 "2017-06-14T13:08:59Z")

</div>

Ok. The error was because of the empty position data (latitude, longitude). It finally worked and I could add the gateway.  
I then have joined a node and sent some message. The weird thing is, that the messages are coming through but the gateway status remains as `not connected`  
 ![](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/8/89bf32060fb9e802bc449461a8474b12c6bbdda5.png)  
 ![](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/f/fc92943c3f48c6977fd1f20493e40ceccdbe8e97.png)

---

<div class="post-metadata">

**Author:** ![jpmeijers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jpmeijers/32/44875_2.png) [@jpmeijers](https://www.thethingsnetwork.org/forum/u/jpmeijers)\
**Post date:** [June 14, 2017, 2:54pm UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/8 "2017-06-14T14:54:42Z")

</div>

You can see from the two screenshots that the gateway id’s are different. So either another gateway is receiving your packets, or your real gateway EUI is different.

Registered as: `0000024B08030454`  
Received by: `FCC23DFFFF0DEA72` (Located in Luzern)  
_(yes, I just typed those over from your screenshots)_

---

<div class="post-metadata">

**Author:** ![maus](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/maus/32/4922_2.png) [@maus](https://www.thethingsnetwork.org/forum/u/maus)\
**Post date:** [June 20, 2017, 7:10am UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/9 "2017-06-20T07:10:21Z")

</div>

Seems that I was talking to a stranger.

---

<div class="post-metadata">

**Author:** ![elobau](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/e/ecc23a/32.png) [@elobau](https://www.thethingsnetwork.org/forum/u/elobau)\
**Post date:** [February 14, 2018, 12:37pm UTC](https://www.thethingsnetwork.org/forum/t/firewall-settings-and-gateway-id/7885/10 "2018-02-14T12:37:56Z")

</div>

Hi @jpmeijers and @maus,  
thanks for this post, I have the same problem right now. I use the Kerlink Wirnet 868 as well and I did that too:

> [@maus](#):
>
> The EUI marked in the logfile was only 4 bytes long. I used that one from local\_conf.json.

But in the Console the Gateway is still not connected…  
Have you solved it?

Thanks for your help!
