DNATing packets travelling over a bridge
"Mike Milner" <[email protected]> Wed, 4 Jul 2007 10:48:25 -0400
| Newsgroups | gmane.linux.network.bridge.ebtables.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have a transparent firewall to the internet setup using ebtables with a transparent bridge between two ethernet interfaces. Neither of the two interfaces nor the bridge have an IP address assigned. I am adding a third network card to the firewall that will be connected directly to another computer. The third network card and the other computer will be on a subnetwork of their own (not part of the bridge) What I would like to do is redirect some of the outgoing firewall traffic to the other computer without the internal clients having any configuration changes. My first idea of the setup: REDIRECT_IP=1.2.3.4 INTERNAL_IP=192.168.0.10 iptables -t nat -A PREROUTING -d $REDIRECT_IP -j DNAT --to-destination $INTERNAL_IP This way any packet coming from the internal LAN destined for 1.2.3.4 will transparently be redirected to my second computer running on 192.168.0.10. I also want the response packet's source address to be re-written to 1.2.3.4 so the client doesn't need to know that the IP was redirected. Will this work on a transparent bridge setup? Thanks, Mike ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/