1 |
On Wed, Sep 7, 2016 at 9:14 AM, Grant <emailgrant@×××××.com> wrote: |
2 |
>>>> Hi, my site is being ravaged by an IP but dropping the IP via |
3 |
>>>> shorewall is seeming to have no effect. I'm using his IP from nginx |
4 |
>>>> logs. IP blocking in shorewall has always worked before. What could |
5 |
>>>> be happening? |
6 |
>>> |
7 |
>>> |
8 |
>>> I'm blocking like this with the firewall running on the web server: |
9 |
>>> |
10 |
>>> /etc/shorewall/rules |
11 |
>>> DROP net:1.2.3.4 $FW |
12 |
>>> |
13 |
>>> Could shorewall/iptables see a different IP address than the one seen by nginx? |
14 |
>> |
15 |
>> |
16 |
>> Most likely the file is configured but the firewall service wasn't |
17 |
>> restarted or the rules no loaded. |
18 |
> |
19 |
> |
20 |
> I restarted shorewall plenty. :) I believe the issue was either a |
21 |
> persistent connection which conntrack-tools would have allowed me to |
22 |
> flush, or my blocking in /etc/shorewall/rules instead of |
23 |
> /etc/shorewall/blrules, or both. |
24 |
> |
25 |
|
26 |
What exactly is your issue? That is, what makes you think you even |
27 |
have an issue? |
28 |
|
29 |
The reason I ask is that all iptables is going to do is drop packets |
30 |
when they reach the kernel. They still go through your network and |
31 |
network card and consume some CPU (even more if you're logging them). |
32 |
If you're being flooded by a very large volume of packets then that |
33 |
will saturate your connection and simply dropping them at the server |
34 |
won't fix the latency this will cause for the good packets. In such |
35 |
an attack you need to block those packets as far upstream as you can |
36 |
before connections start getting saturated. This might be outside of |
37 |
your network perimeter. This is why DDoS attacks are so potent, if |
38 |
you use something like fail2ban to just set iptables are done you're |
39 |
fixing the barn doors after the horses have already left. |
40 |
|
41 |
-- |
42 |
Rich |