Skip to contentSkip to conversation

iptable rule to change incoming interface

DISCUSSION Rishi Kapoor 2 participants 3 messages Dec 7, 2012 – Dec 8, 2012 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I am looking for a iptables rule which can change packet's incoming interface. It seems that ROUTE.patch from patch-o-magic seems best fit, example, "iptables -t mangle -A PREROUTING -i hdlc+ -j ROUTE --iif teql0"

but that patch-o-magic is no longer supported and I couldn't find similar command/module in Xtables add-on which can achieve same effect. Is there any alternative way to change the incoming interface of a packet using iptables?

Thanks !

#1 lore raw
Quoted 3 lines · Rishi Kapoor

Hi,

I am looking for a iptables rule which can change packet's incoming interface.

But what is the point of doing that? You cannot deny the fact that it has come through a particular interface regardless.

#3 lore raw
In reply to a message not in the archive
Quoted 4 lines · rishi kapoor
Quoted 3 lines · Jan Engelhardt
Quoted 3 lines

I am looking for a iptables rule which can change packet's

Quoted 8 lines
Quoted 4 lines

incoming interface.

But what is the point of doing that? You cannot deny the fact that it has come through a particular interface regardless.

Well, I have 2 port NIC and want to configure a local lldp agent running on system to configure port A based on messages received on port B.  You can think of port B as a control network.

You can change the LLDP agent program to configure A based upon B, you do not need to edit the interface field for that.