# Module ipt_MASQUERADE not found

## Net_Spy

Greetings to all

```

modprobe ipt_MASQUERADE # If this fails, try continuing anyway

iptables -F; iptables -t nat -F; iptables -t mangle -F

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

```

ive just emerge iptables but  when i run the above  script  im getting the error message .Im using kernel version  2.6.19

```

FATAL: Module ipt_MASQUERADE not found.

```

 looking forward for you kind response.

 Regards

  Net_Spy

----------

## didymos

Well, does the module exist?

----------

## Net_Spy

thanks for your reply..

here is the output of lsmod

```

Module                  Size  Used by

3c59x                  41384  0 

```

but i could not find this in kernel I recompiled my kernel might I missed it.could you tell me where to find it in kernel ??Looking forward for your kind response.

 Regards

   Net_Spy

----------

## toralf

With kernel 2.6.22 look here :

```
  │ Symbol: IP_NF_TARGET_MASQUERADE [=m]                                                       │

  │ Prompt: MASQUERADE target support                                                          │

  │   Defined at net/ipv4/netfilter/Kconfig:198                                                │

  │   Depends on: NET && INET && NETFILTER && NF_NAT                                           │

  │   Location:                                                                                │

  │     -> Networking                                                                          │

  │       -> Networking support (NET [=y])                                                     │

  │         -> Networking options                                                              │

  │           -> Network packet filtering framework (Netfilter) (NETFILTER [=y])               │

  │             -> IP: Netfilter Configuration                                                 │

  │               -> IP tables support (required for filtering/masq/NAT) (IP_NF_IPTABLES [=m]) │

  │                 -> Full NAT (NF_NAT [=m])                                                  │

```

 BTW, you can search for any kernel config option if you type a "/" within the kernel config menu which can be started with "make menuconfig"

----------

## didymos

No, I meant does the file exist.  Obviously, it's not going to be in lsmod, because modprobing it failed.  Modules are found under /lib/modules/<kernel-version>.  Did you build iptables into the kernel?  If so, then there won't be a module to load.  Check the output of this:

```

grep MASQ /usr/src/linux/.config

```

if it looks something like this:

```

CONFIG_IP_NF_TARGET_MASQUERADE=y

```

then it's not a module and nothing needs to be loaded to use it.  If it looks like so:

```

CONFIG_IP_NF_TARGET_MASQUERADE=m

```

then you probably didn't install the modules after building the kernel, so do this:

```

make -C /usr/src/linux modules_install

```

----------

