[MAC] geoiplookup 명령어 설치


IP geolocation from command line on OSX

Internet contains zillion of sites bloated with banners, which basically give you the same data: given the IP address, provide some info on where this IP is coming from.

Same basic information can be accessed from command line, here is how you configure it, assuming your OSX machine has brew/port, and can compile C source code.

This will install geoiplookup utility:
git clone https://github.com/maxmind/geoip-api-c.git
cd geoip-api-c/
autoreconf -ivf
./configure
make
sudo make install

Now we need the actual GeoIP databases that utility will use. You can buy more accurate data, but we'll use the free, less accurate for now:

cd /tmp/
curl -O http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
curl -O http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
curl -O http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
curl -O http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
curl -O http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
curl -O http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz

find . -name "Geo*.gz" | xargs -I {} gunzip {}
mv GeoLiteCityv6.dat GeoIPCityv6.dat
mv GeoLiteCity.dat GeoIPCity.dat

sudo mv Geo*.dat /usr/local/share/GeoIP/

Sample run:
geoiplookup 8.8.8.8

GeoIP Country Edition: US, United States
GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 38.000000, -97.000000, 0, 0
GeoIP ASNum Edition: AS15169 Google Inc.


'___기타' 카테고리의 다른 글

Let's Encrypt(certbot)  (0) 2019.06.11
[MAC] geoiplookup 명령어 설치  (0) 2018.09.07
[URL] Rackmonkey  (0) 2017.06.07
[ANSIBLE] 계정 생성 및 삭제  (0) 2017.04.25
[ANSIBLE] 일반 계정 생성  (0) 2017.04.25
[오픈소스] Ansible 일반 계정으로 배포하기  (0) 2017.04.16

[URL] HeidiSQL


HeidiSQL


https://www.heidisql.com/download.php

'___사이트URL' 카테고리의 다른 글

[URL] Text to ASCII Art Generator  (0) 2018.10.23
[URL] Easy Bash PS1 Generator  (0) 2018.10.23
[URL] HeidiSQL  (0) 2018.08.13
[URL] stocks.exchange  (0) 2018.06.27
[URL] SSL Server Test  (0) 2017.05.26
[URL] Python PyCharm  (0) 2017.05.15

[리눅스] RVM ruby install

RVM  ruby install


curl -sSL https://rvm.io/mpapis.asc| gpg2 --import -


curl -sSL https://get.rvm.io| bash -s stable


source /etc/profile.d/rvm.sh


rvm install ruby

[URL] stocks.exchange

 

https://stocks.exchange

'___사이트URL' 카테고리의 다른 글

[URL] Easy Bash PS1 Generator  (0) 2018.10.23
[URL] HeidiSQL  (0) 2018.08.13
[URL] stocks.exchange  (0) 2018.06.27
[URL] SSL Server Test  (0) 2017.05.26
[URL] Python PyCharm  (0) 2017.05.15
Hewlett Packard Enterprise 고객 지원 센터(일련 번호 조회)  (0) 2016.05.16

[리눅스] syslog(rsyslog)로 로그시스템 구성


리눅스 syslog(rsyslog)로 로그시스템 구성

 

# mkdir -p /apps/syslog

 

# vi /etc/rsyslog.d/rsyslog-server.conf
# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

 

# Provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514

 

#$template RemoteHost,"/apps/syslog/%$year%/%hostname%/%hostname%-%$year%%$month%%$day%%$hour%.log"
$template RemoteHost,"/apps/syslog/%$year%/%fromhost-ip%/%fromhost-ip%-%$year%%$month%%$day%%$hour%00-%$year%%

$month%%$day%%$hour%59.log"
*.* ?RemoteHost

 

# systemctl restart rsyslog

 

 

참고URL :
https://www.fibrevillage.com/sysadmin/221-rsyslog-rules-examples-on-linux
https://www.rsyslog.com/doc/master/configuration/properties.html

 

◀ PREV 123456···131 NEXT ▶