Skip to contentSkip to conversation

setting up network sharing

DISCUSSION vineet bhargava 3 participants 3 messages Oct 15, 2004 – Oct 16, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,

I am having trouble setting up internet conenction sharing on an embedded device. I am running linux kernel v2.4.18 with iptables and netfilter support.

When I try to run this command -
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE

I am getting the following error -
iptables v1.2.2: Couldn't load target `MASQUERADE':File not found

Try `iptables -h' or 'iptables --help' for more information.

Any pointers/ideas on this would be much appreciated.

Thanks,
Vineet

#1 lore raw
Quoted 6 lines · vineet bhargava

Hi all,

I am having trouble setting up internet conenction sharing on an embedded device. I am running linux kernel v2.4.18 with iptables and netfilter support.

Quoted 7 lines

When I try to run this command -
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE

I am getting the following error -
iptables v1.2.2: Couldn't load target `MASQUERADE':File not found

first off--that is an *_ANCIENT_* version of iptables...1.2.8/1.2.9 is the oldest version i still see in use regularly, as SuSE and RH are keeping them around...however--the current version is 1.2.11...

anyways--it sounds like you compiled a custom kernel w/o MASQUERADE support. does your kernel config have the following set:

CONFIG_IP_NF_TARGET_MASQUERADE=m

the 'm' would be for a modular kernel, a non-modular kernel would have it set to 'y'

if you do have that set in your kernel, and your kernel is modular, check the output of:

lsmod | grep ipt_MASQUERADE

and if you don't see any output, try loading it with:

modprobe ipt_MASQUERADE

the module in question should be located at:

/lib/modules/uname -r/kernel/net/ipv4/netfilter/ipt_MASQUERADE.o

HTH...

-j

Signature · 1 line
Jason Opperisano <[email protected]>
#2 lore raw
Quoted 21 lines · Jason Opperisano

first off--that is an *_ANCIENT_* version of iptables...1.2.8/1.2.9 is the oldest version i still see in use regularly, as SuSE and RH are keeping them around...however--the current version is 1.2.11...

anyways--it sounds like you compiled a custom kernel w/o MASQUERADE support. does your kernel config have the following set:

CONFIG_IP_NF_TARGET_MASQUERADE=m

the 'm' would be for a modular kernel, a non-modular kernel would have it set to 'y'

if you do have that set in your kernel, and your kernel is modular, check the output of:

lsmod | grep ipt_MASQUERADE

and if you don't see any output, try loading it with:

modprobe ipt_MASQUERADE

Quoted 7 lines

the module in question should be located at:

/lib/modules/uname -r/kernel/net/ipv4/netfilter/ipt_MASQUERADE.o

HTH...

-j

Or maybe he doesn't have the support in the userspace iptables tool.

Signature · 12 lines
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
[email protected]
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"