Skip to content

Commit

Permalink
Only allow localhost connections to MongoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
osoner committed Aug 25, 2014
1 parent a203a61 commit 7cef254
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 36 deletions.
8 changes: 8 additions & 0 deletions bin/countly.install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ apt-get -y install sendmail

apt-get -y install build-essential || (echo "Failed to install build-essential." ; exit)

#drop packages coming from 0/0 going through mongodb port
#allow those coming from localhost
iptables -A INPUT -m state --state NEW -p tcp --destination-port 27019 -s localhost -j ACCEPT
iptables -A INPUT -m state --state NEW -p tcp --destination-port 27019 -s 0/0 -j DROP

#install iptables-persistent
apt-get install iptables-persistent

#install time module for node
( cd $DIR/../api ; npm install time )

Expand Down
8 changes: 8 additions & 0 deletions bin/countly.upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ echo "
"

#drop packages coming from 0/0 going through mongodb port
#allow those coming from localhost
iptables -A INPUT -m state --state NEW -p tcp --destination-port 27019 -s localhost -j ACCEPT
iptables -A INPUT -m state --state NEW -p tcp --destination-port 27019 -s 0/0 -j DROP

#install iptables-persistent
apt-get install iptables-persistent

#DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#mongo countly $DIR/updateCollections.js

Expand Down
36 changes: 0 additions & 36 deletions bin/geoip-updater.sh

This file was deleted.

0 comments on commit 7cef254

Please sign in to comment.