From owner-freebsd-stable@freebsd.org Tue Jan 7 03:28:53 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D71D1F573A for ; Tue, 7 Jan 2020 03:28:53 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47sHsd0HQMz4bq6 for ; Tue, 7 Jan 2020 03:28:52 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (c-73-225-95-104.hsd1.wa.comcast.net [73.225.95.104]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id 0073Sj37013395 (version=TLSv1.2 cipher=AES128-SHA bits=128 verify=NO); Mon, 6 Jan 2020 19:28:45 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: Light GeoIP support dropped? To: Kevin Oberman , Alexander Koeppe Cc: FreeBSD-STABLE Mailing List References: From: Julian Elischer Message-ID: Date: Mon, 6 Jan 2020 19:28:39 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 47sHsd0HQMz4bq6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.94 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.95)[-0.948,0]; ASN(0.00)[asn:36236, ipnet:204.109.60.0/22, country:US]; NEURAL_HAM_LONG(-0.99)[-0.991,0] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2020 03:28:53 -0000 On 1/6/20 6:04 PM, Kevin Oberman wrote: > On Mon, Jan 6, 2020 at 1:17 PM Alexander Koeppe wrote: > >> Hi, >> >> since I've upgraded to FreeBSD 12, I don't find a package providing the >> lightweight geoip database API incl. GeoIP.h and libGeoIP.so. >> >> I only find `geoipupdate` which is the non-free variant of the API. >> >> Has the package been renamed? >> >> Thanks >> >> - Alex > > GeoIP and the GeoIP 1 database were discontinued early last year. They were > replaced by net/libmaxminddb and GeoIP 2 database. I have no idea if any > form of free data is available. there is a partial alternative in ports... https://www.freshports.org/search.php?query=ipdbtools&search=go&num=10&stype=name&method=match&deleted=excludedeleted&start=1&casesensitivity=caseinsensitive It uses the official national registrations for country enumeration, and can generate firewall tables directly. Here's the cron script I use to generate a table in ipfw that only allows australian and US addresses (for example): #!/bin/sh ALLOWFILE=/root/AU+USA-GEOIPS.ipfw MAILTABLE=20 ALT_MAILTABLE=21 AU_VAL=10000 US_VAL=10200 #fetch latest geo-ip ranges and set AU and USA into table ${MAILTABLE} ipdb-update.sh ipup -t AU=${AU_VAL}:US=${US_VAL} -n ${ALT_MAILTABLE} > ${ALLOWFILE} ipfw table ${ALT_MAILTABLE} flush ipfw -q -f ${ALLOWFILE} ipfw table ${MAILTABLE} swap ${ALT_MAILTABLE} > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >