Anyone experiencing massive attack?


#1

I have received over 100 fail2ban emails in the last 2 hours, almost all reporting attempts in 2-digit. Is it just me or anyone else is also experiencing this?


(Tom Ray) #2

Just you so far


#3

:frowning:
I’m getting 2 types of email
Sub: [Fail2Ban] SIP: banned xx.xx.xx.xx on {hostname}
[Fail2Ban] recidive: banned xx.xx.xx.xx on {hostname}

A large number of them… is there anything I should be worried about?

Thanks


#4

recidive tells you when an IP has been repeatedly banned and now is in the long-term jail. The SIP bans are shorter term. Should you be worried? that’s up to you :slight_smile: If you don’t need that external traffic pestering your server, perhaps you could set up some firewall rules.


#5

Thanks @billsimon

Long-term jail is good!!

We have remote workers so the only way for me to setup firewall rules is to first have a VPN in place. A VPN would actually work like a firewall.

Are there any workarounds to avoid spam traffic?


#6

Sure… use only TLS for your remotes and block plain SIP. Scanners don’t usually bother with TLS. Or change to an unusual port. (recommended on this forum often)


#7

Both suggestions sounds good, will get this done!!


#8

I changed SIP port.
Did “Apply” in freepbx,
Did “fwconsole restart” in terminal
Still getting insane fail2ban email. :frowning:
Is there something I missed?


#9

Are you certain that most of the fail2ban notices relate to SIP (it also monitors SSH, web, etc.)?

When you changed the SIP port (if you did it properly), all your extensions should have stopped working. To get them going again, you would have to forward the new port through your firewall, and reconfigure each extension to use the new port.

For pjsip, the port is called Port to Listen On; for chan_sip it’s called Bind Port.


#10

Yes. See attached. https://nimb.ws/xh48H7

Yes, the extensions stoped working. I changed the configuration of a few extensions to connect to the new SIP port. Extensions connected fine. I did a few extn-to-extn test calls, all worked fine. But within minutes I started seeing Fail2Ban emails again. I waited for 30 min. Emails continued. That’s when I concluded that changing SIP port did not do anything good for me.

I use PJSIP.
I changed the port here -> FreePBX Web GUI > Settings > Asterisk SIP Settings > SIP Settings (chan_pjsip) > Port to Listen On.

Did “Apply” in freepbx,
Did “fwconsole restart” in terminal

I think I did it right.


#11

oh! wait, I only changed pjsip & not chansip.


#12

Changed ports in chan_sip & chan_jpsip.
Waiting for fail2ban emails… to not come :))


#13

fail2ban emails still coming. It did not help, what could I be doing wrong?


(Franck Danard) #14

Hi.

If you want to use some remote extensions, the best way should be to connect the extensions through a VPN of course.
Next, configure some rules in your firewall to accept only trusted hosts, IP address and drop the others.
I did it for many years, that works fine.
Sometimes it’s not easy to know what are trusted host / ip address but you can add one any time you want.

Otherwise, you could use a SBC in front of your system.


(system) closed #15

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.