Skip to contentSkip to conversation

VM bridged : NAT not done twice

DISCUSSION Simon Huet 1 participant 1 message Jan 21, 2003 netfilter

lore
Share & tools
lore

Simon Huet

author
#0 lore raw

Hi folks,

I am using some user-mode-linux VM to build a bridge firewall/routing device.

________________________
| |
| HOST |
| ____________ |
| | | |
| | UML VM | |
| | | |
---[ ]===[ ]- -[ ]===[ ]---

eth0|     |eth0    eth1|     |eth1 
    |     |            |     |
    |     |____________|     |
    |                        |
    |                        |
    |________________________|

Everything is fine except for any SNAT rules. They are applyied on each the host ethernet interface.

When packets are coming from one host interface, going through the VM and coming out on the other host interface the SNAT rules are not applied which is not the case when they are originating from the VM.

Obviously, POSTROUTING is already done on those packets and it will not be done twice.

Is there a way to mangle each packets in order to let netfilter think those packets are new? Does someone knows way to do that? Or does someone could tell me where I should start hacking code?

Thanks in advance.

---------------------------
Simon HUET [[email protected]]
---------------------------
NUMLOG
23, rue des Poiriers
78370 Plaisir
TEL : 01 30 79 16 16
WWW : http://www.numlog.fr/
---------------------------