Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geoip attack map DAEMON #8

Open
diegodblr opened this issue Feb 13, 2017 · 2 comments
Open

geoip attack map DAEMON #8

diegodblr opened this issue Feb 13, 2017 · 2 comments

Comments

@diegodblr
Copy link
Contributor

To facilitate the task of stopping and starting the process, follow the process I did:

OS: Debian

cd /etc/systemd/system/

nano geoipattack1.service

[Unit]
Description = Geoip Attack Snort LOG
After = syslog.target network.target

[Service]
Type = simple
ExecStart = / home/user/geoip-attack-map/AttackMapServer/AttackMapServer.py

[Install]
WantedBy = multi-user.target

nano geoipattack2.service

[Unit]
Description = Geoip Attack Snort LOG DATA
After = syslog.target network.target

[Service]
Type = simple
ExecStart = /home/ user/geoip-attack-map/DataServer/DataServer.py

[Install]
WantedBy = multi-user.target

systemctl daemon-reload

systemctl start geoipattack1

systemctl start geoipattack2

systemctl stop geoipattack1

systemctl stop geoipattack2

@diegodblr
Copy link
Contributor Author

diegodblr commented Feb 13, 2017

In AttackMapServer.py:

Register handler pages

handlers = [
            (r'/websocket', WebSocketChatHandler),
            (r'/static/(.*)', tornado.web.StaticFileHandler, {'path': '/home/user/geoip-attack-map/AttackMapServer/static'}),
            (r'/flags/(.*)', tornado.web.StaticFileHandler, {'path': '/home/user/geoip-attack-map/AttackMapServer/static/flags'}),
            (r'/', IndexHandler)
            ]

@diegodblr
Copy link
Contributor Author

diegodblr commented Feb 13, 2017

In DataServer.py:

db_path = '/home/user/geoip-attack-map/DataServerDB/GeoLite2-City.mmdb'

I commented the verbose mode:

#parser.add_argument('-v', '--verbose', action='store_true', dest='verbose', help='run server in verbose mode')

# parse arguments/options
#args = parser.parse_args()
#return args

comment:

if args.verbose:
print(ip_db_unclean)
print('------------------------')
print(json_data)
print('Event Count: {}'.format(event_count))
print('------------------------')
print('Event Count: {}'.format(event_count))
print('------------------------')
else:
continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant