Skip to content

Commit

Permalink
remote worker configuration, allow default routes to workers
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckablack committed Oct 23, 2020
1 parent 236bb29 commit d60336b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
8 changes: 5 additions & 3 deletions quokka/controller/CaptureManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ def find_monitor(ip=None):
if ip in IPNetwork(network):
return CaptureManager.capture_monitors[network]

else:
# If we didn't find a specific monitor, default to localhost
return "localhost"
if "0.0.0.0/0" in CaptureManager.capture_monitors:
return CaptureManager.capture_monitors["0.0.0.0/0"]

# If we didn't find a specific monitor, default to localhost
return "localhost"

@staticmethod
def initiate_capture(ip, protocol, port, count):
Expand Down
8 changes: 5 additions & 3 deletions quokka/controller/PortscanManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ def find_monitor(ip=None):
if ip in IPNetwork(network):
return PortscanManager.portscan_monitors[network]

else:
# If we didn't find a specific monitor, default to localhost
return "localhost"
if "0.0.0.0/0" in PortscanManager.portscan_monitors:
return PortscanManager.portscan_monitors["0.0.0.0/0"]

# If we didn't find a specific monitor, default to localhost
return "localhost"

@staticmethod
def initiate_portscan(host_ip, host_name, token):
Expand Down
8 changes: 5 additions & 3 deletions quokka/controller/TracerouteManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ def find_monitor(target=None):
if target in TracerouteManager.traceroute_monitors:
return TracerouteManager.traceroute_monitors[target]

else:
# If we didn't find a specific monitor, default to localhost
return "localhost"
if "0.0.0.0/0" in TracerouteManager.traceroute_monitors:
return TracerouteManager.traceroute_monitors["0.0.0.0/0"]

# If we didn't find a specific monitor, default to localhost
return "localhost"

@staticmethod
def initiate_traceroute(target, token):
Expand Down
2 changes: 1 addition & 1 deletion quokka/data/capturemonitors.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
192.168.254.0/24 : 192.168.254.136
0.0.0.0/0 : 192.168.254.136
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cfs eth distribute
feature vpc
feature telemetry
vlan 1-9,100-105
vpc domain 10
telemetry
sensor-group 1
Expand Down
2 changes: 1 addition & 1 deletion quokka/data/portscanmonitors.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
192.168.254.0/24 : 192.168.254.136
0.0.0.0/0 : 192.168.254.136

0 comments on commit d60336b

Please sign in to comment.