# Modprobe ipt\_MASQUERADE missing

**URL:** <https://forum.legato.io/t/modprobe-ipt-masquerade-missing/5958>\
**Category:** Uncategorized\
**Created:** [September 7, 2021, 8:34am UTC](https://forum.legato.io/t/modprobe-ipt-masquerade-missing/5958 "2021-09-07T08:34:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [September 7, 2021, 8:34am UTC](https://forum.legato.io/t/modprobe-ipt-masquerade-missing/5958/1 "2021-09-07T08:34:29Z")

</div>

I am trying to load the ipt\_MASQUERADE modprobe on the legato (from shell) and this is not found.  
modprobe: module ipt\_MASQUERADE not found in modules.dep

Trying to follow this legato doc:

> **[wifi - Legato Docs](https://docs.legato.io/18_09/wifi_toolsTarget_wifi.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

Does anyone has experienced this when running the wifiApTest?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [September 9, 2021, 7:44am UTC](https://forum.legato.io/t/modprobe-ipt-masquerade-missing/5958/2 "2021-09-09T07:44:47Z")

</div>

I remember the NAT function is already working when sharing LTE data to ethernet iot card.

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [September 9, 2021, 7:59am UTC](https://forum.legato.io/t/modprobe-ipt-masquerade-missing/5958/3 "2021-09-09T07:59:30Z")

</div>

I have tried that but it seems that this part of the code is briking the unit (from the sample app):

RunSystemCommand(“modprobe ipt\_MASQUERADE”);

```
RunSystemCommand("iptables -I POSTROUTING -t nat -o " ITF_WAN " -j MASQUERADE");
RunSystemCommand("iptables -I FORWARD --match state "
    "--state RELATED,ESTABLISHED --jump ACCEPT");
RunSystemCommand("iptables -I FORWARD -i " ITF_LAN " --destination " SUBNET
    " --match state --state NEW --jump ACCEPT");
RunSystemCommand("iptables -I INPUT -s " SUBNET " --jump ACCEPT");
RunSystemCommand("iptables -I FORWARD -i " ITF_WAN " --jump ACCEPT");
RunSystemCommand("iptables -I FORWARD -o " ITF_WAN " --jump ACCEPT");

```

I am unsure why, but if I run this code, then I can`t ssh into the unit anymore (after reboot), so it possibly changes the routes??  
I can get up the the ip forwarding part and can connect from my phone, had to add an extra file for the wlan0 to dnsmasq, but I am kind of stuck with the bridging from wlan0 to eth0 at this stage. The next step would also be to have a proper routing, for which I believe the easiest way is to run this code and the MASQUERADE kmodule.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [September 9, 2021, 8:02am UTC](https://forum.legato.io/t/modprobe-ipt-masquerade-missing/5958/4 "2021-09-09T08:02:23Z")

</div>

probably it is changing the ECM interface where you used to do console control?

---

<div class="post-metadata">

**Author:** ![ClaudioBaldo](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@ClaudioBaldo](https://forum.legato.io/u/ClaudioBaldo)\
**Post date:** [September 9, 2021, 8:36am UTC](https://forum.legato.io/t/modprobe-ipt-masquerade-missing/5958/5 "2021-09-09T08:36:53Z")

</div>

probably, but I don`t understand how as these commands are only routing from rmnet0 to wlan0, this is why I though of an issue with the ipt\_MASQUERADE module somehow…

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [September 9, 2021, 8:48am UTC](https://forum.legato.io/t/modprobe-ipt-masquerade-missing/5958/6 "2021-09-09T08:48:47Z")

</div>

you enter these commands one by one, and you can find why one makes the problem
