From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Firewall IP change
Date: Sat, 24 Jul 2004 16:47:52 +0100 [thread overview]
Message-ID: <200407241647.52286.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <200407231457.30104.fred99@qualiflow.com>
On Friday 23 July 2004 1:57 pm, Frédéric Gonzatti wrote:
> Hi all,
>
> I've got a big problem with my firewall which have three ethernet cards.
> eth0 : 172.16.2.1/255.255.255.0 ---->LAN
> eth1: 192.168.2.1/255.255.255.0----->DMZ
> eth2: 192.168.3.1/255.255.255.0-----> WAN
>
> This firewall is connect to a router which have Wan IP 192.168.3.254 and a
> public IP for WAN : 62.160.X.X/255.255.255.255
> This configurations is working !!!
This means that your WAN router must be doing SNAT for you on packets to the
Internet, and the corresponding DNAT on packets coming back again.
> I have tried to replace the Wan IP of my firewall by a public IP :
> 62.160.X.Y # ifconfig eth2 62.160.X.Y netmask 255.255.255.248
> # route add default gw 62.160.X.Z (which is new Ip of the router (WAN and
> LAN interfaces of the router are the same)
>
> I can access to the internet from my firewall but unfortunately not from my
> LAN.
> So now I come back to my old configuration until I ask why it was not
> working. Have you got any idea please ?
Yes; if you want to use your WAN router in bridging mode (which it is if you
have the same address on both internal and external interfaces) with a public
IP on your firewall, then you need to SNAT outbound packets (which will
automatically DNAT reply packets for you too):
iptables -A POSTROUTING -t nat -o eth2 -j DNAT --to 62.160.X.Y
Regards,
Antony.
--
This email was created using 100% recycled electrons.
Please reply to the list;
please don't CC me.
next prev parent reply other threads:[~2004-07-24 15:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-21 21:42 Nat for two private subnets with subnet routing Gerry Weaver
2004-07-21 22:02 ` Antony Stone
2004-07-21 22:56 ` John A. Sullivan III
2004-07-23 12:57 ` Firewall IP change Frédéric Gonzatti
2004-07-24 15:47 ` Antony Stone [this message]
2004-07-26 12:13 ` Frédéric Gonzatti
2004-07-26 12:27 ` Antony Stone
2004-07-26 13:20 ` Frédéric Gonzatti
2004-07-26 13:43 ` Antony Stone
2004-07-26 14:03 ` Distributed firewall Gianni Mantellini
2004-07-30 13:22 ` Firewall IP change Fred
2004-07-31 13:50 ` Antony Stone
2004-08-01 3:40 ` Zoup
2004-08-02 12:07 ` Frédéric Gonzatti
2004-08-02 12:26 ` Antony Stone
2004-08-02 14:12 ` Frédéric Gonzatti
2004-08-02 14:57 ` Antony Stone
2004-08-02 15:10 ` Frédéric Gonzatti
-- strict thread matches above, loose matches on Subject: below --
2004-07-24 16:58 Jason Opperisano
2004-07-24 17:17 ` Antony Stone
2004-08-02 15:41 Jason Opperisano
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=200407241647.52286.Antony@Soft-Solutions.co.uk \
--to=antony@soft-solutions.co.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.