Skip to content
This repository was archived by the owner on Feb 13, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions etc/simian/on_corp_cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# This script will, by default, report clients to NOT be on a corporate network.
# The "ON CORP" value in simian is a boolean true / false based on this script returning 1 or 0
# To enable corporate network reporting, set the octets for your corporate network, and uncomment an example test below.
# If you have multiple corporate networks, you can uncomment multiple conditionals below.
# Custom, more complex, tests will work as long as the script returns 1 or 0 respectively.

#EXAMPLE NETWORK OCTETS
#CORP_NETWORK1=$(netstat -nr | grep -c '^192\.169\.')
#CORP_NETWORK2=$(netstat -nr | grep -c '^10\.10\.')

#Tets if
#if [[ "$CORP_NETWORK1" -gt 0 ]]; then
# exit 0 # on corporate Network 1
#fi

#if [[ "$CORP_NETWORK2" -gt 0 ]]; then
# exit 0 # on Corporate Network 2
#fi

exit 1 # NOT on the corporate network