Linux Netfilter discussions
 help / color / mirror / Atom feed
* Bug?  ICMPs sent by REJECT are not getting SNAT'd...
@ 2003-04-02  8:03 Taner Halicioglu
  0 siblings, 0 replies; 8+ messages in thread
From: Taner Halicioglu @ 2003-04-02  8:03 UTC (permalink / raw)
  To: netfilter

Hi, I have a somewhat convoluted setup, so I'll try to describe it.

DSL provider gave me a /29 for my machines
	(say, 200.1.1.0/29)
DSL provider also supplied a /30 to go between DSL modem and the DSLAM.
	(say, 201.1.1.0/30 - irrelevant here, really)
I am using a random /30 to go between the DSL modem and my firewall
	(say, 10.1.1.0/30)

Here is the visual:

    [ISP]
      |
      | [201.1.1.0/30 - irrelevant]
      |
+------------+
| DSL router |
+------------+ = 10.1.1.2
      |
      | [10.1.1.0/30]
      |
+------------------+ eth1 = 10.1.1.1
| Firewall machine |
+------------------+ eth0 = 200.1.1.1
      |
      | [200.1.1.0/29]
      |
   [INSIDE]


For right now, my firewall rules are basiclaly nothing - I pass everything
thru the firewall machine.

I soon realised that since I'm using a non-routed address for the "outside"
interface of the firewall, I run into issues trying to initiate any
connection from the fw machine, so I added:

 iptables -t nat -A POSTROUTING -o eth1 -s 10.1.1.1 -j SNAT --to-source 200.1.1.1

This works for 99% of the traffic sourced on the firewall machine, it seems.

One thing it DOES NOT work for, is the ICMP (and probably RST - didn't try)
packets that are generated by the REJECT target.  These get sourced from the
unroutable address, and since my ISP wisely filters things like that, the
ICMP never makes it to the sender.

Am I doing something wrong, or is this a bug?

Thanks,

	-Taner


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Bug?  ICMPs sent by REJECT are not getting SNAT'd...
@ 2003-04-02  8:06 Taner Halicioglu
  2003-04-02 18:38 ` Taner Halicioglu
  2003-04-11  7:55 ` Jozsef Kadlecsik
  0 siblings, 2 replies; 8+ messages in thread
From: Taner Halicioglu @ 2003-04-02  8:06 UTC (permalink / raw)
  To: netfilter

Hi, I have a somewhat convoluted setup, so I'll try to describe it.

DSL provider gave me a /29 for my machines
	(say, 200.1.1.0/29)
DSL provider also supplied a /30 to go between DSL modem and the DSLAM.
	(say, 201.1.1.0/30 - irrelevant here, really)
I am using a random /30 to go between the DSL modem and my firewall
	(say, 10.1.1.0/30)

Here is the visual:

    [ISP]
      |
      | [201.1.1.0/30 - irrelevant]
      |
+------------+
| DSL router |
+------------+ = 10.1.1.2
      |
      | [10.1.1.0/30]
      |
+------------------+ eth1 = 10.1.1.1
| Firewall machine |
+------------------+ eth0 = 200.1.1.1
      |
      | [200.1.1.0/29]
      |
   [INSIDE]


For right now, my firewall rules are basiclaly nothing - I pass everything
thru the firewall machine.

I soon realised that since I'm using a non-routed address for the "outside"
interface of the firewall, I run into issues trying to initiate any
connection from the fw machine, so I added:

 iptables -t nat -A POSTROUTING -o eth1 -s 10.1.1.1 -j SNAT --to-source 200.1.1.1

This works for 99% of the traffic sourced on the firewall machine, it seems.

One thing it DOES NOT work for, is the ICMP (and probably RST - didn't try)
packets that are generated by the REJECT target.  These get sourced from the
unroutable address, and since my ISP wisely filters things like that, the
ICMP never makes it to the sender.

Am I doing something wrong, or is this a bug?

Thanks,

	-Taner


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-04-15 22:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-02  8:03 Bug? ICMPs sent by REJECT are not getting SNAT'd Taner Halicioglu
  -- strict thread matches above, loose matches on Subject: below --
2003-04-02  8:06 Taner Halicioglu
2003-04-02 18:38 ` Taner Halicioglu
2003-04-11  7:55 ` Jozsef Kadlecsik
2003-04-11 16:48   ` Taner Halicioglu
2003-04-11 18:58     ` Jozsef Kadlecsik
2003-04-11 19:08       ` Taner Halicioglu
2003-04-15 22:37         ` Taner Halicioglu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox