All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shaun T. Erickson" <ste@smxy.org>
To: netfilter@lists.netfilter.org
Subject: Re: incoming interface confusion question [LONG]
Date: Mon, 21 Jun 2004 17:13:04 -0400	[thread overview]
Message-ID: <40D74F60.6030105@smxy.org> (raw)
In-Reply-To: <1087849139.17067.25.camel@localhost>

Ok, here's some more detail on what happened.

I have a SonicWall firewall as my external firewall. Its external 
address and the address of the systems in the DMZ hanging off of it, are 
in a pool of 16 real IPs we got from the ISP.

The LAN port of the SonicWall is connected to a hub. The only other 
thing connected to the hub is eth0 of my internal iptables 
router/firewall. I have an internal lan hanging off eth1 of the iptable 
system, and a second internal lan hanging off eth2 of the iptables 
system. The SonicWall has two static routes pointing traffic for my 
internal lans to eth0 on the iptables system. Both of my lans use 
non-routable private ip address space.

What happened is that the iptables system dropped what appear to be 
quite methodical scans of system on one of my lans by sites out on the 
internet. It saw the packets coming in eth0 and destined to head out 
eth1 and, based on my rulesets, logged and dropped them.

The problem is, the iptables system should have never seen them in the 
first place. The source addresses are from multiple internet sites, 
coming from either port 80 or port 443, and were destined for the 
private address space of one of my internal lans. The initial 
destination port seemed randomly chosen, but then incremented by 1. Most 
often, 92 bytes was sent to each port, but not always. The ruleset of 
the SonicWall should not allow such traffic through it. They looked over 
my ruleset and could find nothing that would allow such traffic to pass 
their device. Moreover, traffic destined for private non-routable 
address space can't be routed over the internet, as routers along the 
way would drop it, so it would seem the traffic couldn't have come in 
the wan port of the SonicWall. Now, maybe they broke into a system on my 
DMZ. Well, I did an nmap scan of my internal lan from the DMZ and the 
sonicwall screamed in it's logs that a port scan was happening and it 
dropped the packets. The iptables system never saw the scan. So that 
suggests that it didn't come from my DMZ, either.

How else could the traffic have arrived? Well, outside the sonicwall, 
there is a switch between it and my external router. Plugged into that 
switch is a wireless access point. If someone was on that, the packets 
would still have to come through the sonicwall to be seen by the 
iptables system. Sonicwall says the packets could not have come through 
their device.

Ok. Next theory: some system on the inside is compromised and spoofing 
the source address of the packets it sends out. So maybe something on 
lan2 tried to scan something on lan1. The problem with that is that on 
the iptables system, I have a rule that says if a packet comes in eth2 
with a source address other than one from the network attached to that 
interface, the system is to drop the packet. I have a similar rule for 
packets coming in eth1 from the other lan. So, that suggests that the 
packets couldn't have come from the inside, either.

We have a separate, smaller sonicwall that acts as our vpn concentrator. 
Only vpn traffic passes through that device. If someone broke in via our 
vpn, they'd either get a dhcp address on that lan or they could pretend 
to be something else. If they spoofed packet source from there, again 
the rule saying drop packets with a source other than that net would 
kick in.

So, The ruleset on the sonicwall says it couldn't have come from the 
outside, and the rulset on the iptables system says it couldn't have 
come from the inside.

Now what?

	-ste


  reply	other threads:[~2004-06-21 21:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-21 17:45 incoming interface confusion question Shaun T. Erickson
2004-06-21 19:28 ` Shaun T. Erickson
2004-06-21 20:18   ` John A. Sullivan III
2004-06-21 21:13     ` Shaun T. Erickson [this message]
2004-06-21 22:28       ` Antony Stone
2004-06-21 23:07         ` Shaun T. Erickson
2004-06-22  0:13           ` [SOLVED] " Shaun T. Erickson
2004-06-21 22:33       ` incoming interface confusion question [LONG] John A. Sullivan III
2004-06-22  6:37   ` incoming interface confusion question Jozsef Kadlecsik
2004-06-21 19:36 ` Cedric Blancher
2004-06-21 20:34   ` Ranjeet Shetye

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=40D74F60.6030105@smxy.org \
    --to=ste@smxy.org \
    --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.