Announcement

Collapse
No announcement yet.

Where does hs store the blocked ip's ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Where does hs store the blocked ip's ?

    Anyone does know where hs store the blocked ip's ?
    i have every 1hour 5 attemps to login again...
    i want to block there ip's in my firewall and homeseer.

    regards
    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




    HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

    #2
    The addresses are in the HS3 log. Look for 'has been blocked'.

    For the month of March, here are the intrusions to my HS3:
    Mar-28 21:44:41 Web Server IP Address 54.195.23.182 has been blocked from further access to the system.
    Mar-28 19:39:14 Web Server IP Address 222.143.158.1 has been blocked from further access to the system.
    Mar-27 16:34:32 Web Server IP Address 220.166.95.195 has been blocked from further access to the system.
    Mar-27 03:49:48 Web Server IP Address 190.147.163.94 has been blocked from further access to the system.
    Mar-26 18:22:18 Web Server IP Address 95.170.159.5 has been blocked from further access to the system.
    Mar-26 12:38:55 Web Server IP Address 211.39.130.154 has been blocked from further access to the system.
    Mar-04 11:29:36 Web Server IP Address 200.69.247.221 has been blocked from further access to the system.
    Mar-04 09:39:49 Web Server IP Address 1.189.21.18 has been blocked from further access to the system.
    Mar-01 23:37:28 Web Server IP Address 121.40.40.229 has been blocked from further access to the system.

    February was even worst. Some of these addresses are probably spoofed. For example, 54.195.23.0 is Amazon.com Inc., Dublin, Ireland. Many are from China, some from Columbia, Russia, North Korea, Argentina.

    I'm not using the default Web port 80 or 8080 and these are actual HS logon failed attempts (8 per event) , not just port poking, so a bit troubling.

    Comment


      #3
      Originally posted by claude View Post
      The addresses are in the HS3 log. Look for 'has been blocked'.

      For the month of March, here are the intrusions to my HS3:
      Mar-28 21:44:41 Web Server IP Address 54.195.23.182 has been blocked from further access to the system.
      Mar-28 19:39:14 Web Server IP Address 222.143.158.1 has been blocked from further access to the system.
      Mar-27 16:34:32 Web Server IP Address 220.166.95.195 has been blocked from further access to the system.
      Mar-27 03:49:48 Web Server IP Address 190.147.163.94 has been blocked from further access to the system.
      Mar-26 18:22:18 Web Server IP Address 95.170.159.5 has been blocked from further access to the system.
      Mar-26 12:38:55 Web Server IP Address 211.39.130.154 has been blocked from further access to the system.
      Mar-04 11:29:36 Web Server IP Address 200.69.247.221 has been blocked from further access to the system.
      Mar-04 09:39:49 Web Server IP Address 1.189.21.18 has been blocked from further access to the system.
      Mar-01 23:37:28 Web Server IP Address 121.40.40.229 has been blocked from further access to the system.

      February was even worst. Some of these addresses are probably spoofed. For example, 54.195.23.0 is Amazon.com Inc., Dublin, Ireland. Many are from China, some from Columbia, Russia, North Korea, Argentina.

      I'm not using the default Web port 80 or 8080 and these are actual HS logon failed attempts (8 per event) , not just port poking, so a bit troubling.
      On the Amazon intrusion do you use Alexa.

      Comment


        #4
        the thing i need to know is when homeseer has blocked an ip for 1 hour where does he store that ??

        it must be somewhere
        Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
        Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




        HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

        Comment


          #5
          Originally posted by concordseer View Post
          On the Amazon intrusion do you use Alexa.
          No, I use Google Home.

          Comment


            #6
            Originally posted by Malosa View Post
            the thing i need to know is when homeseer has blocked an ip for 1 hour where does he store that ??



            it must be somewhere

            Is the log not sufficient?



            Sent from my iPhone using Tapatalk

            Comment


              #7
              I generally recommend that people take a very close look at what they are making available to the public Internet because you are putting your systems at greater risk.

              Do you really need to make your HS3 publicly accessible either directly on your firewall or through MYHS? If the answer is yes (mine is because some of my points of integration require it) then you need to add security into the publicly accessible services.

              Here, I setup my firewall to regularly synchronize with a few public IPV4/6 block lists. there are block lists for all kinds of sources. I use lists for illicit, compromised, and malicious sources. In my firewall traffic to or from any node on the lists are denied Explicitly.

              I also setup a honeypot to catch people who improperly navigate to my subdomains. I am working to have these IPs added to my ip blocklist automatically.

              Lastly, I am planning on configuring a service (like fail2ban) to scan the logs of all my publicly accessible services parse out bad logon attempts from the public Internet and dynamically update a locally hosted IP blocklist that my firewall will synchronize with.



              Sent from my iPhone using Tapatalk

              Comment


                #8
                Originally posted by Kerat View Post
                Here, I setup my firewall to regularly synchronize with a few public IPV4/6 block lists. there are block lists for all kinds of sources. I use lists for illicit, compromised, and malicious sources. In my firewall traffic to or from any node on the lists are denied Explicitly.
                Hi Kerat, what router/firmware do you use which can sync to the lists you mention? And where does one find those lists?

                This seems like something everyone should consider doing.

                Comment


                  #9
                  Originally posted by NetworkGuy View Post
                  Hi Kerat, what router/firmware do you use which can sync to the lists you mention? And where does one find those lists?

                  This seems like something everyone should consider doing.
                  I'm guessing an expensive/complicated one..
                  RJ_Make On YouTube

                  Comment


                    #10

                    Comment


                      #11
                      there is a way if u have a ddwrt to block those ip's automatically.

                      if you make a event in homeseer that it writes the ip's to a txt file and upload to a server where the script from the ddwrt imports the ip's every time.
                      It is possible but i need to do some testing.


                      regards
                      Last edited by Malosa; March 29, 2018, 02:17 PM.
                      Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                      Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                      HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                      Comment


                        #12
                        the other thing I would recommend as a nice to have would be a system with Intel NICs. that does increase the cost a bit. Not required but nice to have. If I were buying i would be looking at an Intel processor that was Atom based or ends in U (for mobile) as they will also have a lower TDP wattage and thus have lower operating power costs. the Celeron N3160 and Atom E3845 processors support AES-NI. as a recommendation the following would work:

                        https://www.amazon.com/Firewall-Appl...mini+pc+2+NICs

                        https://www.amazon.com/Qotom-Display...ual%2Bnic&th=1

                        do note that you need to check to see if you need to purchase memory and an SSD.

                        Comment


                          #13
                          on the topic of where to find the blocklists. the following sites should have a good number of free publicly accessible drop lists.

                          https://www.iblocklist.com/lists.php
                          https://www.spamhaus.org/drop/

                          Comment


                            #14
                            PFSense is free.

                            The web GUI is intuitive.

                            By default it'll work fine out of the box.

                            You can add plugins / more security a step at a time. Been using PFSense for many years now; never has been an issue. It is solid and never breaks.

                            These days more than ever you need to protect yourself from the internet.
                            - Pete

                            Auto mator
                            Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

                            HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                            HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                            X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                            Comment


                              #15
                              Originally posted by Malosa View Post
                              there is a way if u have a ddwrt to block those ip's automatically.

                              if you make a event in homeseer that it writes the ip's to a txt file and upload to a server where the script from the ddwrt imports the ip's every time.
                              It is possible but i need to do some testing.


                              regards
                              Malosa,

                              What I am doing is search the log with a script and based on the reults I add blocking to the local windows firewall. It is quite complicated, especially on the real blocking part where powershell is required with the blocking itself. But the script can also be adapted to produce a simple list of the past few days and help you adding the blocking by hand.

                              Lately the script is useless for me as I am now only allowing access through vpn so no extenal stuff is allow unless it is vpn.

                              I'll post the script here, so you can adapt it to your own needs.

                              Code:
                              Imports System.Text.RegularExpressions
                              
                              Sub Main(parms As Object)
                              
                                  '============ Change these variables to your needs.
                                  '============ FILE_NAME is holding the location and name of the file to create and read
                                  '============ NoOfDays is holding the number of days to look back in the log, normally a week should do for returning hackers
                                  '============ NumberOfTries is holding the number of tries that should be allowed by you. Use this value wisely, if set to low, your own typo in the password and some extra trying could lock you out!
                                  '============ TaskName is the name of the task to start if new IP's have been found
                              
                                  Dim FILE_NAME As String = "c:\hs3\data\blocklist.txt"
                                  Dim NoOfDays As Integer = 7
                                  Dim NumberOfTries As Integer = 15
                                  Dim TaskName As String = "BlockList"
                              
                                  '======================================================================================
                                  '============ Do not change lines below unless you are sure of what youre doing :-)
                                  '======================================================================================
                              
                                  Dim IpAddresses As New System.Collections.Generic.List(Of String)
                                  Dim NewIPAdresses As New System.Collections.Generic.dictionary(Of String, Integer)
                                  Dim IPAdded As Boolean = False
                                  Dim Logs() As HomeSeerAPI.LogEntry
                                  Dim IP As String
                                  Try
                                      If System.IO.File.Exists(FILE_NAME) = True Then
                                          Dim objReader As New System.IO.StreamReader(FILE_NAME)
                                          Do While objReader.Peek() >= 0
                                              IpAddresses.Add(objReader.ReadLine())
                                          Loop
                                      End If
                                      Logs = hs.GetLog_Date_Text(Now.AddDays(NoOfDays * -1), Now, Nothing, "failed\sfrom:\s\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b", True)
                                      If Logs Is Nothing Then
                                          hs.WriteLog("Hacker Info", "There have been no failed login attempts in the past " & NoOfDays & " Days")
                                          Exit Sub
                                      End If
                                      If Logs.count > 0 Then hs.WriteLog("Hacker Info", "There have been " & Logs.count & " failed login attempts in the past " & NoOfDays & " Days")
                                      If Logs.count = 0 Then Exit Sub
                              
                                      For Each Log As HomeSeerAPI.LogEntry In logs
                                          ip = Regex.Match(log.LogText, "\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b", RegexOptions.Singleline).ToString
                                          If NewIPAdresses.ContainsKey(IP) Then
                                              NewIPAdresses.Item(IP) = NewIPAdresses.Item(IP) + 1
                                          Else
                                              NewIPAdresses.Add(IP, 1)
                                          End If
                                      Next
                                      For Each IP In NewIPAdresses.Keys
                                          If NewIPAdresses.Item(IP) > NumberOfTries Then
                                              If Not IpAddresses.Contains(IP) Then
                                                  IpAddresses.Add(IP)
                                                  hs.WriteLog("Hacker Info", "IP address " & IP & " is added to the blocklist")
                                                  Dim objWriter As New System.IO.StreamWriter(FILE_NAME, True)
                                                  objWriter.WriteLine(IP)
                                                  objWriter.Close()
                                                  IPAdded = True
                                              End If
                                          End If
                                      Next
                                      If ipaddresses.count > 0 Then
                                          hs.WriteLog("Hacker Info", "we have currently " & ipaddresses.count & " IP numbers blocked.")
                                      End If
                                      ' Start task schedular task to update firewall rule
                                      If IPAdded Then
                                          hs.launch("schtasks", "/Run /TN " & TaskName, "", 0)
                                      End If
                                  Catch ex As Exception
                                      hs.writelog("Hacker Info", "Error:" & ex.message)
                                  End Try
                              End Sub
                              Wim
                              -- Wim

                              Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                              1210 devices/features ---- 392 events ----- 40 scripts

                              Comment

                              Working...
                              X