Editing the TTN Gateway's default IP route

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/";