Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two NICs configured, let's say eth0 with IP 10.0.0.1/24 and eth1 with IP 192.168.1.1/24.

IP forwarding is enabled, rp_filter is disabled. I've created 2 tap interfaces and bridged them with:

vde_switch -tap tap0 -tap tap1 -d -s /tmp/vde.ctl

Normally traffic coming from eth0 goes to eth1 and vice versa. Let's say I want packets with destination port 80 arriving on eth0 to go to tap0 instead, go through the bridge, come out of tap1 and only then go out through eth1. The opposite needs to happen to packets arriving on eth1 with source port 80.

I've tried marking packets with iptables PREROUTING rule and then sending them to a different routing table, but I didn't manage to make it work the way I want. The packet's source and destination MAC addresses were changed to that of tap0... :(

Any ideas on how to make this work?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.