Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Luca Scattin" <luca@atlantenet.com>
To: netfilter@lists.netfilter.org
Subject: Bridge-firewall
Date: Wed, 3 Dec 2003 13:55:13 +0100	[thread overview]
Message-ID: <009901c3b99c$b18b9ee0$1e00a8c0@MERCURIO> (raw)

[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]

Hello all.
I have a little problem to build a solution for a customer (an hotel).
I try to explai the situation with an ascii art
--------------
|      PC        |
|    Clent       |
-------------
        |  ip     
        |
--------------
|  Firewall     |
|   Bridge      |
-------------
        |
        |
        |192.168.0.254 (example)
--------------
|  router        |
|                   |
-------------
        | Public IP               
Internet

Client pc have your IP address and default gateway that it's impossible to change.
Bridge/Firewall have to accept all pachets with all ip adress (no problem... it' a bridge) and have to change the ip address of all packets in order to send correctly to the router.
I build the bridge correctly (I Think) with:
brctl addbr br0
brctl stp br0 off
brctl addif br0 eth0
brctl addif br0 eth1
ifconfig eth0 0.0.0.0 up
ifconfig eth1 0.0.0.0 up
ifconfig bro 0.0.0.0 up
route add default gw 192.158.0.254
echo "1" > /proc/sys/net/ipv4/ip_forward

After that bridge is working.
I try to dump pachets in eth0 and eth1 and packest cross the bridge.

Noy I try to modify cleint packet address using SNAT
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 192.168.0.21 (example).
but in the second interface i view allvays the original client packets.... 
I mistake something but I don't know what.
I need help.
Thanks

 
Luca Scattin


[-- Attachment #2: Type: text/html, Size: 3635 bytes --]

                 reply	other threads:[~2003-12-03 12:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='009901c3b99c$b18b9ee0$1e00a8c0@MERCURIO' \
    --to=luca@atlantenet.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox