<div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>We have also done something like this via scripting. Here is an outline of how the scripts work. The main idea is the wwan interface comes up and then you reassign that IP and setup firewall/DHCP configurations. There may need to be some changes but this should be a good place to start.</div><div><br></div><div><font face="monospace"># Remove the IP addresses from the interface<br>ip a flush dev <wwan interface><br>ip link set dev <wwan interface> mtu <MTU from LTE network><br><br>ip link set <wwan interface> up<br>ip link set <lan interface> up<br>ip route add default dev <wwan interface> table 42<br>ip route add default dev <lan interface> table 43<br>ip rule add pref 5042 iif <lan interface> lookup 42<br>ip rule add pref 5043 iif <wwan interface> lookup 43<br><br># Configure proxy arp<br>echo 1 >/proc/sys/net/ipv4/conf/<wwan interface>/proxy_arp<br><br>You then need to configure dhcp such that lan with assign one IP to the the client:<br>cat > /tmp/conf <<- EOM<br> option domain-name-servers ${dns1}${dns2};<br> shared-network <lan interface> {<br> subnet 0.0.0.0 netmask 0.0.0.0 {<br> range <address from LTE network> <address from LTE network>;<br> option subnet-mask 255.255.255.254;<br> option routers <gateway from LTE network>;<br> default-lease-time 43200;<br> max-lease-time 43200;<br> }<br> }<br>EOM<br><br>Start using dhcpd<br>dhcpd -q -pf /var/run/test.pid -cf /tmp/conf -lf /tmp/lease <LAN Interface><br><br># Assign an IP address to the lan network (I've found it doesn't really matter what it is which is kind of interesting.<br>ip a add <LAN IP> dev <lan interface><br><br># The final step is to create firewall rules between the lan and the wan interface so forwarding is allowed </font><br></div><div><font face="monospace"><br></font></div><div>Hope this helps!</div><div>Jack</div><div><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 7, 2021 at 9:27 AM Peter Naulls <<a href="mailto:peter@chocky.org">peter@chocky.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 12/4/21 1:31 PM, James Thomas wrote:<br>
> Evening all,<br>
> <br>
> I’ve been racking my brains trying to figure out how I might, in OpenWRT, get <br>
> modemmanager and netifd to ‘passthrough’ the IP assigned in the bearer when <br>
> making an mbim connection to a client connecting to eth1.<br>
> <br>
> My aim, as I’m sure is apparent, is to make OpenWRT transparent to the device <br>
> connected to eth1 whilst granting that device access to the data connection made <br>
> through modemmanager, OpenWRT and the Sierra EM7455 card.<br>
> <br>
<br>
Good luck. We do passthrough in out solution, but it was a a lot of work, and I <br>
don't think it would be entirely appropriate to reveal all the details (some<br>
pieces are proprietary anyway).<br>
<br>
What I can say is that ModemManager as it stands, isn't up to it - the OpenWrt<br>
setup needs a new protocol for this type of connection. To that end, we don't<br>
presently use ModemManager in this case; I did start work on such a protocol,<br>
but without fixing up all the other pieces, it's of limited use. Maybe it's<br>
something I can contribute one day.<br>
<br>
Also, this would be a bridging setup, vs the default NAT setup in OpenWrt,<br>
but I think that's pretty obvious.<br>
<br>
Regards.<br>
<br>
</blockquote></div></div>