Giter Club home page Giter Club logo

muzammilar / passport Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.14 MB

Passport - Enabling Accurate Country-Level Router Geolocation using Inaccurate Sources | This is the public fork of the original source code at bitbucket.org/muzammilar/passport

Home Page: https://passport.ccs.neu.edu

License: Other

Python 66.49% CSS 0.45% JavaScript 0.07% Less 11.03% SCSS 11.17% HTML 10.45% Shell 0.35%
geolocation ipgeolocation ip-geolocation ipinfo machine-learning decision-trees ensemble-learning internet-measurements

passport's Introduction

Passport: Enabling Accurate Country-Level Router Geolocation using Inaccurate Sources


Passport provides location predictions with limited active measurements, using machine learning to combine information from IP geolocation databases, router hostnames, whois records, and ping (and traceroute measurements) measurements.

Read the full paper at: https://arxiv.org/abs/1905.04651

Webiste: https://passport.ccs.neu.edu

Note: The system was originally written in Python2.7 in 2016.

Publications

  • Abdul Rehman, Muzammil, Sharon Goldberg, and David Choffnes. "Passport: enabling accurate country-level router geolocation using inaccurate sources." arXiv preprint arXiv:1905.04651 (2019). Link: https://arxiv.org/abs/1905.04651

Website

Check out the website at: https://passport.ccs.neu.edu

User Guide

https://docs.google.com/document/d/1rw15Egq2bvc6R6B6WLXZ464R5s2nZrJRLn4rJPFEWIM

Pre-setup Instructions

Things that you'll need:

  • Databases from Maxmind, IP2Location, and DBIP. Look at geoloc-server/config.py for the names of the files (containing databases) and geoloc-server/data folder for minor modifications to the database files downloaded from their websites.
  • API Key for EurekAPI
  • API Key for IPInfo.io
  • API Key for Google Maps API
  • API Key for revtr.ccs.neu.edu
  • A prayer that ddec.caida.org is working

Setup Instructions

  • Move all scripts in the setup directory to current directory.
  • Run third_party.sh (or third_party_centos.sh depending on your OS)
  • Run mysql_setup_centos.sh (for centos or similar command for your OS)
  • Run create_directories.sh
  • Create and run a virtual environment
  • pip install -r requirements.txt in the virtual environment.
  • Change passwords in geoloc-server/config.txt
  • Create a MySQL database dbgeoroute with utf-8 default coalition.
  • Populate some of the database tables with hints information using the database_tables.tar.bz2 file.
  • In the geoloc-server folder, run sudo python manage.py syncdb
  • You're all set.

Setup Instructions for Production Server (Online System)

Local Server

  • Activate the virtual environment.
  • Modify config.py in the geoloc-server folder, set WEB_DEBUG_MODE to True
  • Run python passport.py in the geoloc-server folder.

Production Server

  • Install nginx.
  • Copy contents from nginx.conf to /etc/nginx/nginx.conf. Modify /etc/nginx/nginx.conf as per production requirements (see geoloc-server/config.py file for the server port).
  • Make sure port 80 and 443 are externally visible.
  • Run sudo service nginx start (or sudo service nginx reload)
  • Follow the tutorial following tutorial for setting up HTTPS using Let's Encrypt: https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-centos-7
  • Activate the virtual environment.
  • Modify config.py in the geoloc-server folder, set WEB_DEBUG_MODE to False
  • Run uwsgi --reload-on-exception --enable-threads --python passport.py 2>&1 > /dev/null & in the geoloc-server folder
  • Note: The above command is known to have runtime problems since we have multiple processes running, so run python passport.py 2>&1 > /dev/null & in the geoloc-server folder. If you can get the system to run under uwsgi, go ahead.
Stopping the Production Server
  • Run pkill -9 uwsgi. Note: This command will kill all the processes with name uwsgi. Run it if you're sure only Passport system is using uwsgi.
Opening Port 80
  • Run sudo apt-get install iptables (or sudo yum install iptables on CentOS)
  • Run sudo iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
  • Run sudo /etc/init.d/iptables save or sudo /sbin/iptables-save (depends on OS)
  • On CentOS sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
  • On CentOS sudo firewall-cmd --reload
  • On CentOS/SELinux sudo setsebool -P httpd_can_network_connect 1 if nginx cannot connect to the client port.
Instructions on CentOS Restart/MySQL Database and Nginx Issues on CentOS

Database Hints Tables

passport's People

Contributors

muzammilar avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.