Editing the TTN Gateway's default IP route


(Frank Lynam) #1

Hi there,

I’ve just received delivery of my TTN Gateway and Node devices and have set them up and they are running beautifully. I have to say that the process was quick, smooth and painless - well done! Now for my query.

Is it possible to configure the IP settings of the TTN Gateway? Specifically, I want to edit the default route/gateway of the device. Instead of sending the traffic directly to my broadband router, I want to first route it through a second (local) gateway device. Is this possible?

Thanks for the help,
Frank


(Arjan) #2

Changing the IP routing won’t help you, as TLS will not allow you to fool the gateway into connecting to whatever middleman you’d be setting up.

So, you’d need to read Building the TTN Gateway firmware from the GitHub code and search for bootstrap code such as:

char* default_asvrurl = "https://account.thethingsnetwork.org/";

(Frank Lynam) #3

Thanks for the prompt response. When the TTN Gateway’s wifi/ethernet client connects to the local broadband router, it will given the IP address of the LAN’s default gateway - usually the IP address of the broadband router. Are you saying that this local IP address cannot be set to a static value unless you build a new TTN Gateway firmware?

Sorry if I’m repeating myself but I just want to be clear before I go ahead with the new firmware approach.


(Arjan) #4

Ah, my bad, I (erroneously) figured that you wanted to peek into the gateway’s traffic, (erroneously) thinking that “a second (local) gateway device” was referring to some LoRaWAN gateway/network server.

If you’re just referring to some network settings, then I’d search for the solution in your network; I doubt there are any settings in the gateway.

(Also, for a man-in-the-middle I just noticed that one might not need to create one’s own firmware, as one seems to be able to change the default account server URL in http://things-gateway.local as well. That would still need a middleman to alter any configuration that the account server might return, such as the URLs for the MQTT server, before passing that to the gateway.)


(Frank Lynam) #5

That’s interesting what you say about changing the Account Server to point to another server. It’s a more complicated approach than just changing the default route on the TTN Gateway (as it would in effect require an IP proxy to be built) but it might be a solution to my problem.

Thanks again.