Commit 08c0c117 authored by Cool Fire's avatar Cool Fire

Added checking for local networks as source.

parent b2fcd0a2
......@@ -7,7 +7,8 @@ require 'ipaddr'
fw_logfile = '/home/coolfire/fw_alerts.log'
f2b_logfile = '/var/log/fail2ban.log'
own_ip = IPAddr.new '80.112.131.85'
home_net_4 = IPAddr.new '80.112.131.85/32'
home_net_6 = IPAddr.new '2001:470:1f15:958::2:1/64'
cc_address = 'coolfire@insomnia247.nl'
......@@ -36,7 +37,7 @@ fh.each_line do |line|
ip = IPAddr.new ip
# Make sure we don't report ourself
if( ip == own_ip )
if( home_net_4.include? ip || home_net_6.include? ip )
next
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment