Reply

Re: Nighthawk R6400 - Redirect outgoing IP address

solarsurf
Aspirant

Nighthawk R6400 - Redirect outgoing IP address

I have a data logger on a local area network that sends data to a remote server for long-term storage. The company that provides the server and storage service is terminating support and will no longer accept data from this data logger. The communication protocol between the devices is a simple HTTP call. The data logger has the IP address of this remote server hard-coded in firmware; I am not able to change it. 

 

Is it possible to use the a Netgear router to redirect the outgoing communication from the data logger to a URL of my choosing (instead of the hard-coded IP address) so that I can use my own remote server to receive the data from the data logger?

 

Thank you for any guidance you can provide.

 

 

Model: R6400|AC1750 Smart WiFi Router
Message 1 of 8

Accepted Solutions
antinode
Guru

Re: Nighthawk R6400 - Redirect outgoing IP address

>    Some might. [...]

 

   Note that some non-Netgear routers (or non-Netgear firmware for
Netgear routers) might allow the user to specify name-address data in
potentially useful ways for your situation.  I seem to recall (dimly)
questions in these forums from users who sought how-to guidance for a
Netgear router to do what they had been doing on some other vendor's
models.  More market research might reveal a router which has a more
helpful feature set.

View solution in original post

Message 7 of 8

All Replies
antinode
Guru

Re: Nighthawk R6400 - Redirect outgoing IP address

> I have a data logger [...]

 

   Not a very detailed description of that device.

 

> [...] The data logger has the IP address of this remote server
> hard-coded in firmware; I am not able to change it.

 

   Someone set it once.

 

> [...] The company that provides the server and storage service [...]

 

   They have no advice or guidance?

 

> Is it possible [...]

 

   I doubt it.  I can't see exactly what it was doing when it worked,
which makes it tough to guess how to intercept whatever it tries to do.
For example, to identify the remote server, does it use a particular IP
address, or a particular DNS name, or what?


   I don't see a simple way to do anything for HTTP redirection in
general.  I can imagine establishing a custom DNS server and/or a
separate router whose LAN would be on the subnet of the old remote
server, so that you could disguise your own server as the old remote
server.  An HTTP proxy might be useful, too, depending of the details of
your "my own remote server".

 

   Knowing approximately nothing about your "a data logger", I suspect
that replacing it with something over which you have more control might
make more sense than trying to fake out this one.  But what do I know?

Message 2 of 8
solarsurf
Aspirant

Re: Nighthawk R6400 - Redirect outgoing IP address

Thank you for the reply.

 

I'm sorry, I think I was not specific enough and included too much extra information.

 

I have attached a file that contains a snapshot of a typcial HTTP message from the local device  to the remote server. It shows a the IP of the destination server as  174.143.16.154   and the URL of the server as "gw1.eri-gw.com" as specified in the HTTP message. 

 

I am wondering if there is a way to configure a router so that the router substitutes another URL or IP address for the URL "gw1.eri-gw.com"?

 

I understand that redirecting this HTTP message is unlikely; I just want to fill in the blanks of my original post.

 

Thank you for your help.

 

Message 3 of 8
antinode
Guru

Re: Nighthawk R6400 - Redirect outgoing IP address

> I'm sorry, I think I was not specific enough and included too much
> extra information.

 

   The best of all possible worlds.

 

> I am wondering if there is a way to configure a router so that the
> router substitutes another URL or IP address for the URL
> "gw1.eri-gw.com"?

 

   I know of none.  Fiddling with HTTP messages as they pass through
isn't really its job.

 

> I have attached a file [...]

 

   Ok.  Depending on what your mystery gizmo really is, some relatively
simple things might be possible.


   If it uses (or can use) a "hosts" file for its name resolution, then
you might be able to fool it into using the address of your choice for
that DNS name, "gw1.eri-gw.com" (by editing that "hosts" file).


   Otherwise, pointing the thing at a local DNS server could accomplish the
same thing.  But I know nothing about how it does name resolution.

 

   But, even if you could point your mystery gizmo at a server address
of your choice, then you'd still need to provide the actual server.  A
generic web server should not be a big problem, but this one needs to
have a "/rectrack/get_lua.php" (PHP script, I assume) to accept the data
(with those parameters, "serno=xxxxxxxxxxxx&command=get_instruction").

 

   With my weak psychic powers, I know nothing about what that script
does with the data.  If it were _my_ magic PHP script, then I might be
reluctant to give you a copy of it, but you could always ask the vendor
for assistance.


> I understand that redirecting this HTTP message is unlikely; I just
> want to fill in the blanks of my original post.

 

   Understood.  A quick Web search for things like "get_lua.php" found
approximately nothing, so I'd guess that we're not dealing with a
mass-market product here.  Without some serious cooperation from the
vendor, you might be looking at some real reverse-engineering work to
replace the vanishing service.  (Find a talented student who's not
getting enough screen time these days?)

Message 4 of 8
solarsurf
Aspirant

Re: Nighthawk R6400 - Redirect outgoing IP address

antinode,

 

Thank you again for your informative posts.

 

I have the skills to write the php script for a server to handle the handshake with the logger. In other packets that I captured I was able to see all of the details. It is a fairly simple handshake that is not quite trivial, but not that difficult to implement.

 

My issue is that the logger (my mystery device) points only at the fixed URL "gw1.eri-gw.com". This value is hard-coded. That is, there is no file that I can modify to have it point to a different URL. I found a backdoor GUI for the logger and was hoping that this would allow me to redefine the server URL, but it does not.

 

Not knowing much about routers, I was hoping that a typical router would keep a small domain name table within its local memory. If this were the case, it would seem that there might be a way to override the IP address that the router gets from its standard DNS. However, as I write this, I realize that this would probably present a security risk and so is probably not a control that a router manufacturer would make available.

 

Thanks

 

 

 

Message 5 of 8
antinode
Guru

Re: Nighthawk R6400 - Redirect outgoing IP address

> [...] I was hoping that a typical router would keep a small domain
> name table within its local memory. [...]

 

   Some might.  Even some Netgear models might.  I've never seen a
Netgear model which allows the user to fiddle with anything of that
sort.  Hence the suggestion of a local DNS server (or "hosts" file),
with which you _can_ fiddle.  (A Raspberry Pi, for example.)

 

   This kind of redirection stuff is not impossible, but getting a
consumer-grade Netgear router to do it might be tough.

 

   The DNS processing in a typical Netgear router does intercept names
like "routerlogin.net", and deals with them internally, so it's not as
if the whole concept is foreign, but it's not intended to be
user-configurable.  (And I know approximately nothing about the
details.)

 

   If your R6400[vX?] allows you to enable Telnet access into it, then
you might be able to find a way poke something into it to get the
desired effect, but something like a firmware update, or even a restart,
might clean out any such modification.  (And Netgear has crippled that
(undocumented) feature in recent R7000 firmware, too, so relying on it
carries its own dangers.)  Everything's complicated.

Message 6 of 8
antinode
Guru

Re: Nighthawk R6400 - Redirect outgoing IP address

>    Some might. [...]

 

   Note that some non-Netgear routers (or non-Netgear firmware for
Netgear routers) might allow the user to specify name-address data in
potentially useful ways for your situation.  I seem to recall (dimly)
questions in these forums from users who sought how-to guidance for a
Netgear router to do what they had been doing on some other vendor's
models.  More market research might reveal a router which has a more
helpful feature set.

Message 7 of 8
solarsurf
Aspirant

Re: Nighthawk R6400 - Redirect outgoing IP address

Many thanks for that information antinode. I learned a lot.

 

Best regards to you,

Message 8 of 8
Discussion stats
  • 7 replies
  • 1001 views
  • 0 kudos
  • 2 in conversation
Announcements

Orbi WiFi 6E