(E-Mail Removed) wrote:
> Hi prg,
>
> If I remove the drop the unclean rule, the server hangs almost ten
> times a day.
> With the unclean rule added, it freezes only once.
I presume you are using unclean to drop packets. Correct?
> I even write a libnet based program to generate absoilutely junk
> packets and sent them to the server but it did not freeze! I still
> can't figure out what maybe the issue...
The question is whether the specific packets you note are freezing up
your machine, though it is nice to know that "junk packets" are not a
problem.
If you look at /usr/src/linux-2.4/net/ipv4/netfilter/ipt_unclean.c you
can see why the log messages are showing up and what/how "unconforming"
packets are tested.
I presume that you are allowing incoming SYN (new connections) packets.
In this case, you really should filter according to your specific
needs. You can look at examples of other scripts for ideas of what you
might need. Eg.,
http://www.linuxguruz.com/iptables/
http://www.stearns.org/modwall/sample/tcpchk-sample
Some firewall projects may be suitable. Eg.,
http://www.shorewall.net/
The logs you posted are not sufficient to really pin down what's going
on and/or why it might be freezing your machine, especially as you are
running custom qdisc configs and probably several netfilter modules.
The packets _may_ be designed to freeze your machine and force a
reboot, but my guess is that it's scanning activity/probing (by someone
that does not know what they are doing?).
Run down the IP src/dst addresses and see if they "make sense" or give
evidence that they are spoofed. Eg., the martians are _patently_
someone playing around -- the dst IP 0.1.0.4 is illegal and
192.168.1.46 would indicate someone on your private network. The
unclean packets show legal (but sensible?) IPs, but the port # 1751 is
"assigned" to Swiftnet. Swiftnet is a vpn provider for institutional
financial messaging/transaction services (not clear if 1751 is their
vpn access port). The embedded fragment packet is how UDP returns a
RST for an unused port #.
I would set up more complete logging in iptables and try to focus on
the suspicious traffic -- IPs, ports, TCP flags. You really need
timestamps for the entries to be useful. Are the packets showing at
particular times? In bursts? All with the same src/dst/ports?
To get a complete picture of what may be happening, you will have to
capture the packets and examine them. This is best done on a separate
box using a hub,eg., capable of seeing all passing traffic.
The tough part is that your machine is providing an ongoing service
which means you have to be more careful and cautious about packet
captures and trying solutions. No way to tell you how best to go about
these details.
You may also want to post to the netfilter or ethereal mailing lists if
you can't figure out what's happening or for advice. There are people
on those lists that are very sharp/experienced in these detective
efforts. Also some of the other ngs may be worth a visit, like:
comp.protocols.tcp-ip
comp.security.firewalls
comp.security.unix
This may take a week or two to sort out unless you run across someone
who has seen this traffic before. I could not find any hints that this
is part of a particular or current hack attempt. There is always a
chance that it's bad luck and a misconfigured/misbehaving router. You
also have to determine that it's not originating from "inside" your
network. Tedious work...
I'm clearing my desk for a trip, so I can't be of any more help. If I
do run across something, I'll post, otherwise...
good luck,
prg