Teltonika firmware is based on openwrt. They provide means to setup IP passthrough, so that openwrt acts as a dumb modem and passes its WAN IP to the LAN device. Here is a video about it. Jump to 3:03 for the interesting modes Passthrough and Bridge.
Anybody knows how can it can be done using stock firmware?
I am not sure what part of "IP Passthrough" is not clear. It is a standard feature of 4G router like Cradlepoint and also on openwrt based devices like mofi.
IP Passthrough means that the 4G router (openwrt device) acts like a bridge device (NAT disabled) and passes the WAN IP to the primary router/firewall (pfsense in my case).
Maybe using trelay? It is basically a brainless packet mirror.
trelay relays ethernet packets between two devices (similar to a bridge), but without any MAC address checks. This makes it possible to bridge client mode or ad-hoc mode wifi devices to ethernet VLANs, assuming the remote end uses the same source MAC address as the device that packets are supposed to exit from.
you bridge the two LAN and WAN interfaces of the modem device with trelay
And then you spoof the mac with macchanger or whatever other tool (or UCI as said above), on either the modem wan or the router wan so that both ports have the same mac address.