Whois package on NethServer Fail2ban Module

Ok, sorry!
I have installed Fail2ban with whois option.
When I receive a notification email with banned IP, the message say that the whois program is missing.

Software%20center%202

rpm%20-%20whois

1 Like

Could you please restart fail2ban, else there is another whois rpm, could you please install it… but Firstly restart fail2ban and wait some ban

Yum search whois

I have an old email with the same message.
From then, I have restarted F2B and even reboot the server for many times (some updates, …).

Let me check the whois installed on my server, I know it is working whois

1 Like

OK!

TIA,
Gabriel

PS:
In the past, when I have installed Fail2ban from here:
https://wiki.nethserver.org/doku.php?id=module:fail2ban
with whois, it worked.

Edit:
maybe is something wrong with whois dependencies.

sorry I cannot reproduce

[root@prometheus ~]# rpm -qa |grep whois
whois-5.1.1-2.el7.x86_64
[root@prometheus ~]# rpm -qa | grep fail2ban
fail2ban-server-0.9.7-1.el7.noarch
fail2ban-firewalld-0.9.7-1.el7.noarch
fail2ban-shorewall-0.9.7-1.el7.noarch
fail2ban-sendmail-0.9.7-1.el7.noarch
fail2ban-0.9.7-1.el7.noarch
nethserver-fail2ban-1.0.4-1.ns7.noarch

this is what I have…Since how many time did you install the rpm whois…is it possible to need to wait sometime before to sync the whole database :-?

Hi,

The IP 67.164.207.205 has just been banned by Fail2Ban after
3 attempts against sshd.


Here is more information about 67.164.207.205 :


#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/whois_reporting/index.html
#



# start

NetRange:       67.164.192.0 - 67.164.207.255
CIDR:           67.164.192.0/20
NetName:        UTAH-3
NetHandle:      NET-67-164-192-0-1
Parent:         COMCAST (NET-67-160-0-0-1)
NetType:        Reassigned
OriginAS:       
Customer:       Comcast Cable Communications, Inc. (C00500168)
RegDate:        2003-04-02
Updated:        2004-07-02
Ref:            https://whois.arin.net/rest/net/NET-67-164-192-0-1


CustName:       Comcast Cable Communications, Inc.
Address:        3 Executive Campus
Address:        5th Floor
City:           Cherry Hill
StateProv:      NJ
PostalCode:     08002
Country:        US
RegDate:        2003-04-02
Updated:        2016-08-31
Ref:            https://whois.arin.net/rest/customer/C00500168

OrgTechHandle: IC161-ARIN
OrgTechName:   Comcast Cable Communications Inc
OrgTechPhone:  +1-856-317-7200 
OrgTechEmail:  CNIPEO-Ip-registration@cable.comcast.com
OrgTechRef:    https://whois.arin.net/rest/poc/IC161-ARIN

OrgAbuseHandle: NAPO-ARIN
OrgAbuseName:   Network Abuse and Policy Observance
OrgAbusePhone:  +1-888-565-4329 
OrgAbuseEmail:  abuse@comcast.net
OrgAbuseRef:    https://whois.arin.net/rest/poc/NAPO-ARIN

# end


# start

NetRange:       67.160.0.0 - 67.191.255.255
CIDR:           67.160.0.0/11
NetName:        COMCAST
NetHandle:      NET-67-160-0-0-1
Parent:         NET67 (NET-67-0-0-0-0)
NetType:        Direct Allocation
OriginAS:       AS7922
Organization:   Comcast Cable Communications, LLC (CCCS)
RegDate:        2002-12-16
Updated:        2016-08-31
Ref:            https://whois.arin.net/rest/net/NET-67-160-0-0-1



OrgName:        Comcast Cable Communications, LLC
OrgId:          CCCS
Address:        1800 Bishops Gate Blvd
City:           Mt Laurel
StateProv:      NJ
PostalCode:     08054
Country:        US
RegDate:        2001-09-17
Updated:        2017-01-28
Ref:            https://whois.arin.net/rest/org/CCCS


OrgTechHandle: IC161-ARIN
OrgTechName:   Comcast Cable Communications Inc
OrgTechPhone:  +1-856-317-7200 
OrgTechEmail:  CNIPEO-Ip-registration@cable.comcast.com
OrgTechRef:    https://whois.arin.net/rest/poc/IC161-ARIN

OrgAbuseHandle: NAPO-ARIN
OrgAbuseName:   Network Abuse and Policy Observance
OrgAbusePhone:  +1-888-565-4329 
OrgAbuseEmail:  abuse@comcast.net
OrgAbuseRef:    https://whois.arin.net/rest/poc/NAPO-ARIN

# end



#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/whois_reporting/index.html
#

Regards,

Fail2Ban

On one of my server whois was not installed with fail2ban, I just installed it by the software center, just after the installation I tried to be banned by my server, once done I received the email with the whois output of the IP.

I cannot reproduce, please go to logs (fail2ban) and try to see if something warn inside, try also to reinstall

The server was installed from scratch as email server only, around two weeks ago, using the last NS ISO.
As usual, after first login, I made all the updates and then I have installed necessary modules for email server.
This function, whois, did not work from the beginning but I had no time to write about it.
Till yesterday, I removed and reinstalled F2B module, with and without the whois package, for couple of times, without success to make it functionally.
I hope at the end of the week I will have time to reinstall from scratch the server.
I will keep you informed about this.
Thank you for your time!

Kind regards,
Gabriel

No need to reinstall from scratch just for fail2ban

I did it without success.

Well…we have no settings to detect and triggers the whois informations, this is an internal fail2ban issue. If you can gather some logs/warns/things we could make an upstream bug, without these it is useless

@other could you reproduce ?

Please

whereis whois

Check

How they query whois or they display the warn about the lack of whois bin

just an idea, try whois from the command line

whois 8.8.8.8

/usr/bin/whois <ip> ||… means the command does not exit 0 which can have multiple causes.

1 Like

check resolving hostname (DNS) ?

Default configuration of whois tries to connect to www.arin.net

ping www.arin.net

or

ping www.google.com

Out of ideas, its clear the problem is not missing whois, the message “missing whois program” is misleading.

@GG_jr whois 8.8.8.8 returns Unable to connect to remote host ; which probably is whois.arin.net (not sure about the later).

does curl whois.arin.net give a ‘normal’ response?

[root@ ~]# curl whois.arin.net
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="http://whois.arin.net/ui/">here</a>.</p>
</body></html>

net

my output of whois 8.8.8.8

[root@ ~]# whois 8.8.8.8

#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/whois_reporting/index.html
#



# start

NetRange:       8.0.0.0 - 8.127.255.255
CIDR:           8.0.0.0/9
NetName:        LVLT-ORG-8-8
NetHandle:      NET-8-0-0-0-1
Parent:         NET8 (NET-8-0-0-0-0)
NetType:        Direct Allocation
OriginAS:
Organization:   Level 3 Parent, LLC (LPL-141)
RegDate:        1992-12-01
Updated:        2018-04-23
Ref:            https://whois.arin.net/rest/net/NET-8-0-0-0-1



OrgName:        Level 3 Parent, LLC
OrgId:          LPL-141
Address:        100 CenturyLink Drive
City:           Monroe
StateProv:      LA
PostalCode:     71203
Country:        US
RegDate:        2018-02-06
Updated:        2018-02-22
Ref:            https://whois.arin.net/rest/org/LPL-141


OrgAbuseHandle: IPADD5-ARIN
OrgAbuseName:   ipaddressing
OrgAbusePhone:  +1-877-453-8353
OrgAbuseEmail:  ipaddressing@level3.com
OrgAbuseRef:    https://whois.arin.net/rest/poc/IPADD5-ARIN

OrgTechHandle: IPADD5-ARIN
OrgTechName:   ipaddressing
OrgTechPhone:  +1-877-453-8353
OrgTechEmail:  ipaddressing@level3.com
OrgTechRef:    https://whois.arin.net/rest/poc/IPADD5-ARIN

# end


# start

NetRange:       8.8.8.0 - 8.8.8.255
CIDR:           8.8.8.0/24
NetName:        LVLT-GOGL-8-8-8
NetHandle:      NET-8-8-8-0-1
Parent:         LVLT-ORG-8-8 (NET-8-0-0-0-1)
NetType:        Reallocated
OriginAS:
Organization:   Google LLC (GOGL)
RegDate:        2014-03-14
Updated:        2014-03-14
Ref:            https://whois.arin.net/rest/net/NET-8-8-8-0-1



OrgName:        Google LLC
OrgId:          GOGL
Address:        1600 Amphitheatre Parkway
City:           Mountain View
StateProv:      CA
PostalCode:     94043
Country:        US
RegDate:        2000-03-30
Updated:        2017-12-21
Ref:            https://whois.arin.net/rest/org/GOGL


OrgTechHandle: ZG39-ARIN
OrgTechName:   Google LLC
OrgTechPhone:  +1-650-253-0000
OrgTechEmail:  arin-contact@google.com
OrgTechRef:    https://whois.arin.net/rest/poc/ZG39-ARIN

OrgAbuseHandle: ABUSE5250-ARIN
OrgAbuseName:   Abuse
OrgAbusePhone:  +1-650-253-0000
OrgAbuseEmail:  network-abuse@google.com
OrgAbuseRef:    https://whois.arin.net/rest/poc/ABUSE5250-ARIN

# end



#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/whois_reporting/index.html
#

in other words your curllpit is getting whois to work maybe others have insights on this :hushed:

1 Like