Forwarding TCP Traffic Within LAN on a Pepwave MAX Router

I have a Pepwave MAX BR1 router, and I’m facing an issue with a TCP client device (STM32 microcontroller) trying to connect to a server inside the same LAN.

The STM32 device is configured to connect to 10.36.3.1:PORT (which is the router’s gateway IP).
However, the actual TCP server is running on a different LAN device (e.g., 10.36.3.100:PORT).
The STM32 cannot be reconfigured to connect directly to 10.36.3.100.

Is there any way to force port forwarding to work within the LAN?
Any other suggestions to achieve LAN-to-LAN forwarding?

Thanks in advance for your help! :rocket:

Hi, @SahanWijerathna

okay

but… this network is in the same network of lan? or? another netmask?

WAN ip of BR1… Just the first two octets…

So…
BR1 at LAN site will be listen for a " virtual port " at his ip and it need to forward this udp/tcp packet to another network. Can BR1 ping this another network?

Hi, @MarceloBarros
Both the client device (STM32 microcontroller) and the server device (PC) are on the same LAN. However, the client is attempting to connect to the router’s gateway address (10.36.3.1) instead of the actual server at 10.36.3.100.

Since I am unable to modify the STM32 firmware, is there a way to forward TCP connection requests from the router (10.36.3.1) to the server (10.36.3.100)? Any suggestions would be greatly appreciated.

Hi…

I am doing test at my lab…

Can you change the netmask of the STM32 ?

Sample… Are you using 10.36.3.0/24 ?
Can you change to 10.36.3.0/25 ?

updating…
Hi… changing the netmask of lan side…
Yes… work, using Surf Soho 8.3.0… But I need more details about your topology, to be sure about what I am doing at my side…

So…
I add an IP at wan as a secondary ip /32.
Create a rule to forward the ip/32 to ip_lan at lan side of the device.

Sample…

  • lan side of my device 192.168.50.1/25
  • secondary ip at wan of my device 192.168.50.129/32. wan ip of the device is 192.168.2.3/29
  • port forward… rule… destination 192.168.50.129:2222 remap to 192.168.50.13:22

telnet 192.168.50.129 2222 from host_a (192.168.50.10)

getting at host_b (192.168.50.13)
tcp 0 0 192.168.50.13:22 192.168.50.1:49006 ESTABLISHED

I don’t know… why it replace the source ip as the lan device ip… But I’m checking… Can be because thie Peplink device think… this is the source " wan " as a source of the packet… I don’t have behind doors to do a debug at peplink.