# IP passthrough in OpenWrt

**URL:** <https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772>\
**Category:** Installing and Using OpenWrt\
**Created:** [May 11, 2019, 11:03am UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772 "2019-05-11T11:03:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![trumee](https://forum.openwrt.org/letter_avatar/trumee/32/5_5575768a8748004e209b776fc1b2916d.png) [@trumee](https://forum.openwrt.org/u/trumee)\
**Post date:** [May 11, 2019, 11:03am UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772/1 "2019-05-11T11:03:44Z")

</div>

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](https://www.rut950.com/rut950-ip-passthrough-bridge-mode/) 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?

---

<div class="post-metadata">

**Author:** ![rj-45](https://forum.openwrt.org/user_avatar/forum.openwrt.org/rj-45/32/1411_2.png) [@rj-45](https://forum.openwrt.org/u/rj-45)\
**Post date:** [May 11, 2019, 12:35pm UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772/2 "2019-05-11T12:35:24Z")

</div>

Ask the Teltonika people.

---

<div class="post-metadata">

**Author:** ![trendy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trendy/32/8800_2.png) [@trendy](https://forum.openwrt.org/u/trendy)\
**Post date:** [May 11, 2019, 12:56pm UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772/3 "2019-05-11T12:56:15Z")

</div>

Something like these?  
[https://openwrt.org/docs/guide-user/network/wan/dmz-based-bridge-mode](https://openwrt.org/docs/guide-user/network/wan/dmz-based-bridge-mode)  
[https://openwrt.org/docs/guide-user/network/wan/bridge-mode](https://openwrt.org/docs/guide-user/network/wan/bridge-mode)  
[https://openwrt.org/docs/guide-user/network/routing.example.1.bridged.dmz](https://openwrt.org/docs/guide-user/network/routing.example.1.bridged.dmz)

---

<div class="post-metadata">

**Author:** ![trumee](https://forum.openwrt.org/letter_avatar/trumee/32/5_5575768a8748004e209b776fc1b2916d.png) [@trumee](https://forum.openwrt.org/u/trumee)\
**Post date:** [May 11, 2019, 1:34pm UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772/4 "2019-05-11T13:34:46Z")

</div>

Teltonika router needs the MAC address of the primary router, so i am guessing it is not this.

---

<div class="post-metadata">

**Author:** ![jeff](https://forum.openwrt.org/letter_avatar/jeff/32/5_5575768a8748004e209b776fc1b2916d.png) [@jeff](https://forum.openwrt.org/u/jeff)\
**Post date:** [May 11, 2019, 2:08pm UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772/5 "2019-05-11T14:08:29Z")

</div>

What do you want to accomplish?

Without knowing that it is very difficult to offer options to you.

---

<div class="post-metadata">

**Author:** ![trumee](https://forum.openwrt.org/letter_avatar/trumee/32/5_5575768a8748004e209b776fc1b2916d.png) [@trumee](https://forum.openwrt.org/u/trumee)\
**Post date:** [May 11, 2019, 3:07pm UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772/6 "2019-05-11T15:07:19Z")

</div>

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](http://mofinetwork.com/index.php?main_page=product_info&products_id=189).

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).

---

<div class="post-metadata">

**Author:** ![trumee](https://forum.openwrt.org/letter_avatar/trumee/32/5_5575768a8748004e209b776fc1b2916d.png) [@trumee](https://forum.openwrt.org/u/trumee)\
**Post date:** [May 11, 2019, 3:27pm UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772/7 "2019-05-11T15:27:26Z")

</div>

Teltonika has the GPL [sources](http://wiki.teltonika.lt/gpl/RUT9XX_R_GPL_00.06.02.2.tar.gz) listed for the firmware. This [script](https://pastebin.com/dxr39JgL) i believe sets up the Passthrough. It has references to proxy arp.

Another discussion on the same topic is [here](https://forum.openwrt.org/t/bridge-mode-lte-usb-modem/35974/5).

---

<div class="post-metadata">

**Author:** ![trendy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trendy/32/8800_2.png) [@trendy](https://forum.openwrt.org/u/trendy)\
**Post date:** [May 11, 2019, 4:24pm UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772/8 "2019-05-11T16:24:54Z")

</div>

> [@trumee](#):
>
> Teltonika router needs the MAC address of the primary router, so i am guessing it is not this.

This can be easily manipulated in OpenWrt. Option macaddr

> **[UCI networking options cheatsheet](https://openwrt.org/docs/guide-user/network/ucicheatsheet)**
>
> UCI networking options cheatsheet This is a cheatsheet for quick lookup of networking UCI options, useful for experienced users. Section "globals" The globals section contains interface-independent options affecting the network configuration in...

---

<div class="post-metadata">

**Author:** ![bobafetthotmail](https://forum.openwrt.org/user_avatar/forum.openwrt.org/bobafetthotmail/32/39_2.png) [@bobafetthotmail](https://forum.openwrt.org/u/bobafetthotmail)\
**Post date:** [May 11, 2019, 4:25pm UTC](https://forum.openwrt.org/t/ip-passthrough-in-openwrt/36772/9 "2019-05-11T16:25:04Z")

</div>

Maybe using trelay? It is basically a brainless packet mirror.

> <https://github.com/openwrt/openwrt/blob/master/package/kernel/trelay/Makefile>

_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.
