MASQUERADE Target not found (IPTABLES)
Hi all,
My appolagize if make any mistakes in this forum. I was actually doing cross compilation for the snapgear 3.1.1 version and making compilation on LInux 9.0 kernel 2.4.x, b4 compiling snapgear 3.1.1, need to follow make menuconfig for setup iptables and NAT stuff and also others. Once all done successfully, able to run with comand "iptables -A POSTROUTING -t nat -j MASQUERADE -o ixp1" its giving error "iptables v1.2.8 Couldn't find target MASQUERADE". Eventhough selected FULL NAT in configuration, but able to figure out how come target not able to find. Even tried loading kernel modules like ipt_MASQUERADE explicitly b4 try the iptables command, but giving same error. Somoeone Pls help me Rgds bk |
The target is named 'MASQ', not 'MASQUERADE'.
|
Quote:
Quote:
iptables -t nat -A POSTROUTING -o ixp1 -j MASQUERADE Also, if you can't load ipt_MASQUERADE, make sure you did excplicitly select it as a part of the kernel. You may have to go into a submenu or two to see all the various options available. Additionally, I have always had better luck when I compile netfilters stuff as modules. YMMV on that one. |
Ah, I always thought only MASQ worked. My bad.
You are correct, his reversal of syntax could also cause the problem. |
Hi all,
Tks all for your response. I tried as the way you informed: but still couldn't find target MASQ is short form for MASQUERADE. -- eventhough not worked iptables -t nat -A POSTROUTING -o ixp1 -j MASQUERADE -- eventhough not worked. Still mistery how it will show couldnt find target MASQUERADE. Tks bksmart |
Did you compile in masquerade support as a module, or built in to the kernel? If a module, please post the output of 'lsmod'.
|
Hi
Tks for your reply. I tried with kernel and also as kernel module. If kernel then wont see the module even list out using with lsmod, if compiled as module will see ipt_MASQUERADE This file loaded as kernel module ipt_MASQUERADE.o in /lib/module/.../netfilter/ location. Command running correctly when "insmod ipt_MASQUERADE" and when i type command lsmod i can see the module loaded in kernel. But the target still not find. Tks bksmart |
If it were built in to the kernel, there would be no reason to see it in lsmod, as it's not a module. :)
My iptables-related modules are: Code:
ipt_MASQUERADE 2752 1 |
let me check and get back you. Thank you :)
|
No problem. Let me know what you find out.
|
Hi,
I compiled MASQUERADE features as kernel modules and loaded using with insmod command, if i type lsmod i see below: Code:
Module Size Used by Tainted: P ipt_MASQUERADE 1264 0 (unused) ipt_REJECT 3444 0 (unused) ipt_LOG 3140 0 (unused) ipt_state 484 0 (unused) iptable_nat 16772 0 [ipt_MASQUERADE] ipt_conntrack 1100 0 (unused) iptable_filter 1548 0 (unused) ip_tables 13504 9 [ipt_MASQUERADE ipt_REJECT ipt_LOG ipt_state iptable_nat ipt_conntrack iptable_filter] ixp425_eth 17132 0 ixp400 5137608 0 [ixp425_eth] The following error when making MASQUERADE: Code:
# iptables -t nat -A POSTROUTING -o ixp0 -j MASQUERADE iptables v1.2.8: Couldn't find target `MASQUERADE' Try `iptables -h' or 'iptables --help' for more information. bksmart |
Sorry the above lsmod list might not clear, herewith below the modules i can see when i type lsmod
Module Size Used by Tainted: P ipt_MASQUERADE 1264 0 (unused) ipt_REJECT 3444 0 (unused) ipt_LOG 3140 0 (unused) ipt_state 484 0 (unused) iptable_nat 16772 0 [ipt_MASQUERADE] ipt_conntrack 1100 0 (unused) iptable_filter 1548 0 (unused) ip_tables 13504 9 [ipt_MASQUERADE ipt_REJECT ipt_LOG ipt_state iptable_nat ipt_conntrack iptable_filter] ixp425_eth 17132 0 ixp400 5137608 0 [ixp425_eth] |
Try running the command with the verbose switch turned on and tell us what happens. Here is the command to run:
iptables -v -t nat -A POSTROUTING -o ixp1 -j MASQUERADE |
command: iptables -v -t nat -A POSTROUTING -o ixp1 -j MASQUERADE
message: iptables v1.2.8: couldn't find target 'MASQUERADE' |
If you have recompiled a kernel, you will need to recompile iptables to match..
I looks like there have been enough changes done your the kernel for the module to stop working. |
All times are GMT -5. The time now is 04:02 PM. |