Skip to contentSkip to conversation

iptables -j ROUTE --gw xxxx not working?

DISCUSSION Eric B. 2 participants 3 messages Apr 8, 2008

lore
Share & tools
lore

Eric B.

author
#0 lore raw

Hi,

I'm running RHEL4.2 with iptables iptables v1.2.11 from pkg iptables-1.2.11-3.1.RHEL4.

I've tried the following command but been told that --gw argument is unknown:

# iptables -t mangle -I POSTROUTING -j ROUTE --gw 192.168.104.251
iptables v1.2.11: Unknown arg `--gw'

Is this a syntax error (and error in the man pages), or just an option not available in this version of iptables?

Thanks,

Eric

#1 lore raw
Quoted 10 lines · Eric B.

Hi,

I'm running RHEL4.2 with iptables iptables v1.2.11 from pkg iptables-1.2.11-3.1.RHEL4.

I've tried the following command but been told that --gw argument is unknown:

# iptables -t mangle -I POSTROUTING -j ROUTE --gw 192.168.104.251
iptables v1.2.11: Unknown arg `--gw'

Then you don't have(*) ROUTE. I would not even bother with this ancient method of policy routing. Nowadays, MARK is used together with iproute2 to select output routes.

(*) The reason it does not display an error is deeper design problem in iptables. Reason being that it cannot tell beforehand if ROUTE is a chain or an actual target, and as such, failure to load a target extension is considered normal until the tables are actually going to be committed.

author
#2 lore raw

"Jan Engelhardt" <[email protected]> wrote in message news:[email protected]...

Quoted 10 lines · Eric B.
Quoted 8 lines

Hi,

I'm running RHEL4.2 with iptables iptables v1.2.11 from pkg iptables-1.2.11-3.1.RHEL4.

I've tried the following command but been told that --gw argument is unknown:

Quoted 6 lines
Quoted 2 lines
# iptables -t mangle -I POSTROUTING -j ROUTE --gw 192.168.104.251
iptables v1.2.11: Unknown arg `--gw'

Then you don't have(*) ROUTE. I would not even bother with this ancient method of policy routing. Nowadays, MARK is used together with iproute2 to select output routes.

I would be more than happy to avoid this ancient method of policy routing. Indeed, I was trying to get MARK to work together with iproute2 to select my output routes and wasn't working, hence I figured I would try something different (see my msg titled Need help understanding how to debug packet traversal) and see if my logic was at least right. I seem to be having a lot of difficulty "seeing" what my packet is doing via iptables/iproute2.

Sure enough, I did a quick search for a *.ROUTE.so module and couldn't find anything on my system.

Okay - back to the drawing board then....

Thanks for the clarification,

Eric